ElementSlideshowTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 9
c 1
b 0
f 1
dl 0
loc 33
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetCMSFields() 0 4 1
A testGetType() 0 4 1
A testGetSummary() 0 5 1
1
<?php
2
3
namespace Dynamic\Elements\Flexslider\Test\Elements;
4
5
use Dynamic\Elements\Flexslider\Elements\ElementSlideshow;
6
use SilverStripe\Core\Injector\Injector;
7
use SilverStripe\Dev\SapphireTest;
8
use SilverStripe\Forms\FieldList;
9
10
class ElementSlideshowTest extends SapphireTest
11
{
12
    /**
13
     * @var string
14
     */
15
    protected static $fixture_file = '../fixtures.yml';
16
17
    /**
18
     * Tests getCMSFields().
19
     */
20
    public function testGetCMSFields()
21
    {
22
        $object = $this->objFromFixture(ElementSlideshow::class, 'one');
23
        $this->assertInstanceOf(FieldList::class, $object->getCMSFields());
24
    }
25
26
    /**
27
     *
28
     */
29
    public function testGetSummary()
30
    {
31
        $object = $this->objFromFixture(ElementSlideshow::class, 'one');
32
        $result = 'A Slide Image';
33
        $this->assertEquals($object->getSummary(), $result);
34
    }
35
36
    /**
37
     *
38
     */
39
    public function testGetType()
40
    {
41
        $object = $this->objFromFixture(ElementSlideshow::class, 'one');
42
        $this->assertEquals($object->getType(), 'Slideshow');
43
    }
44
}
45