Completed
Pull Request — master (#8)
by Matthew
04:42
created

ElementSlideshowTest::testGetCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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 testGetElementSummary()
30
    {
31
        $object = $this->objFromFixture(ElementSlideshow::class, 'one');
32
        $this->assertEquals($object->ElementSummary(), $object->dbObject('Content')->Summary(20));
33
    }
34
35
    /**
36
     *
37
     */
38
    public function testGetType()
39
    {
40
        $object = $this->objFromFixture(ElementSlideshow::class, 'one');
41
        $this->assertEquals($object->getType(), 'Slideshow');
42
    }
43
}
44