Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | class ElementAccordionTest extends SapphireTest |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected static $fixture_file = '../fixtures.yml'; |
||
17 | |||
18 | /** |
||
19 | * |
||
20 | */ |
||
21 | public function testGetCMSFields() |
||
22 | { |
||
23 | $object = $this->objFromFixture(ElementAccordion::class, 'one'); |
||
24 | $fields = $object->getCMSFields(); |
||
25 | $this->assertInstanceOf(FieldList::class, $fields); |
||
26 | $this->assertNotNull($fields->dataFieldByName('Panels')); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * |
||
31 | */ |
||
32 | public function testGetSummary() |
||
33 | { |
||
34 | $object = $this->objFromFixture(ElementAccordion::class, 'one'); |
||
35 | $count = $object->Panels()->count(); |
||
36 | $this->assertEquals($object->getSummary(), _t( |
||
37 | AccordionPanel::class . 'PLURALS', |
||
38 | '{count} Accordion Panel|{count} Accordion Panels', |
||
39 | [ 'count' => $count ] |
||
40 | )); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * |
||
45 | */ |
||
46 | public function testGetType() |
||
50 | } |
||
51 | } |
||
52 |