Completed
Pull Request — master (#1)
by Jason
11:38 queued 55s
created

SlideshowElementSlideImageDataExtensionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetCMSFields() 0 6 1
1
<?php
2
3
namespace Dynamic\ElementalFlexslider\Test;
4
5
use Dynamic\FlexSlider\Model\SlideImage;
0 ignored issues
show
Bug introduced by
The type Dynamic\FlexSlider\Model\SlideImage 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use SilverStripe\Dev\SapphireTest;
7
use SilverStripe\Forms\FieldList;
8
9
class SlideshowElementSlideImageDataExtensionTest extends SapphireTest
10
{
11
    /**
12
     * @var string
13
     */
14
    protected static $fixture_file = '../fixtures.yml';
15
16
    /**
17
     *
18
     */
19
    public function testGetCMSFields()
20
    {
21
        $object = $this->objFromFixture(SlideImage::class, 'default');
22
        $fields = $object->getCMSFields();
23
        $this->assertInstanceOf(FieldList::class, $fields);
24
        $this->assertNull($fields->dataFieldByName('SlideshowElementID'));
25
    }
26
}
27