FIX Only include extension if elemental is installed (#196)

This commit is contained in:
Guy Sartorelli 2024-07-29 15:16:21 +12:00 committed by GitHub
parent 579e1602e6
commit f380700ea6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 14 deletions

View File

@ -53,6 +53,10 @@ SilverStripe\FrameworkTest\Elemental\Model\ElementalBehatTestObject:
- DNADesign\Elemental\Extensions\ElementalAreasExtension
- SilverStripe\FrameworkTest\Elemental\Extension\ElementalBehatTestExtension
SilverStripe\FrameworkTest\Elemental\Model\MultiElementalBehatTestObject:
extensions:
- SilverStripe\FrameworkTest\Elemental\Extension\MultiElementalAreasExtension
BasicElementalPage:
extensions:
- DNADesign\Elemental\Extensions\ElementalPageExtension
@ -69,7 +73,6 @@ SilverStripe\FrameworkTest\Model\Company:
extensions:
- SilverStripe\FrameworkTest\LinkField\Extensions\CompanyExtension
---
Only:
moduleexists:

View File

@ -5,10 +5,6 @@ namespace SilverStripe\FrameworkTest\Elemental\Admin;
use SilverStripe\Admin\ModelAdmin;
use SilverStripe\FrameworkTest\Elemental\Model\MultiElementalBehatTestObject;
if (!class_exists(MultiElementalBehatTestObject::class)) {
return;
}
class MutliElementalBehatTestAdmin extends ModelAdmin
{
private static $url_segment = 'multi-elemental-behat-test-admin';

View File

@ -3,11 +3,6 @@
namespace SilverStripe\FrameworkTest\Elemental\Model;
use SilverStripe\ORM\DataObject;
use SilverStripe\FrameworkTest\Elemental\Extension\MultiElementalAreasExtension;
if (!class_exists(MultiElementalAreasExtension::class)) {
return;
}
class MultiElementalBehatTestObject extends DataObject
{
@ -17,10 +12,6 @@ class MultiElementalBehatTestObject extends DataObject
private static $table_name = 'ElementalMultiBehatTestObject';
private static $extensions = [
MultiElementalAreasExtension::class,
];
public function canView($member = null)
{
return true;