1 | <?php |
||
2 | |||
3 | namespace DNADesign\ElementalVirtual\Tests; |
||
4 | |||
5 | use DNADesign\Elemental\Models\BaseElement; |
||
6 | use DNADesign\Elemental\Models\ElementalArea; |
||
7 | use DNADesign\Elemental\Tests\Src\TestElement; |
||
0 ignored issues
–
show
|
|||
8 | use DNADesign\Elemental\Tests\Src\TestPage; |
||
0 ignored issues
–
show
The type
DNADesign\Elemental\Tests\Src\TestPage was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
9 | use DNADesign\ElementalVirtual\Model\ElementVirtual; |
||
10 | use SilverStripe\Core\Config\Config; |
||
11 | use SilverStripe\Dev\SapphireTest; |
||
12 | |||
13 | class BaseElementExtensionTest extends SapphireTest |
||
14 | { |
||
15 | protected static $fixture_file = 'BaseElementExtensionTest.yml'; |
||
16 | |||
17 | protected static $extra_dataobjects = [ |
||
18 | TestElement::class, |
||
19 | TestPage::class |
||
20 | ]; |
||
21 | |||
22 | public function setUp() |
||
23 | { |
||
24 | parent::setUp(); |
||
25 | |||
26 | Config::modify()->set('Page', 'can_be_root', true); |
||
27 | |||
28 | $this->page = $this->objFromFixture(TestPage::class, 'page1'); |
||
0 ignored issues
–
show
|
|||
29 | $this->page->publishRecursive(); |
||
30 | } |
||
31 | |||
32 | public function testVirtualElementAnchor() |
||
33 | { |
||
34 | Config::modify()->set(BaseElement::class, 'disable_pretty_anchor_name', true); |
||
35 | |||
36 | $element = $this->objFromFixture(ElementVirtual::class, 'virtual1'); |
||
37 | $linked = $this->objFromFixture(TestElement::class, 'element1'); |
||
38 | |||
39 | $this->assertEquals('e' . $linked->ID, $element->getAnchor()); |
||
40 | } |
||
41 | |||
42 | public function testUpdateCmsFields() |
||
43 | { |
||
44 | $linked = $this->objFromFixture(TestElement::class, 'element1'); |
||
45 | |||
46 | // should show that this element has virtual clones |
||
47 | $list = $linked->getCMSFields()->dataFieldByName('VirtualClones')->getList(); |
||
48 | |||
49 | $this->assertEquals(1, $list->count()); |
||
50 | } |
||
51 | } |
||
52 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths