@@ 3-20 (lines=18) @@ | ||
1 | 1`<?php |
|
2 | ||
3 | class AccordionBlockTest extends SapphireTest |
|
4 | { |
|
5 | /** |
|
6 | * @var string |
|
7 | */ |
|
8 | protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml'; |
|
9 | ||
10 | /** |
|
11 | * |
|
12 | */ |
|
13 | public function testGetCMSFields() |
|
14 | { |
|
15 | $object = $this->objFromFixture('AccordionBlock', 'one'); |
|
16 | $fields = $object->getCMSFields(); |
|
17 | $this->assertInstanceOf('FieldList', $fields); |
|
18 | $this->assertNotNull($fields->dataFieldByName('Panels')); |
|
19 | } |
|
20 | } |
|
21 | ||
22 | class AccordionBlock_ControllerTest extends FunctionalTest |
|
23 | { |
@@ 3-20 (lines=18) @@ | ||
1 | <?php |
|
2 | ||
3 | class ImageBlockTest extends SapphireTest |
|
4 | { |
|
5 | /** |
|
6 | * @var string |
|
7 | */ |
|
8 | protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml'; |
|
9 | ||
10 | /** |
|
11 | * |
|
12 | */ |
|
13 | public function testGetCMSFields() |
|
14 | { |
|
15 | $object = singleton('ImageBlock'); |
|
16 | $fields = $object->getCMSFields(); |
|
17 | $this->assertInstanceOf('FieldList', $fields); |
|
18 | $this->assertNotNull($fields->dataFieldByName('Image')); |
|
19 | } |
|
20 | } |
@@ 3-20 (lines=18) @@ | ||
1 | <?php |
|
2 | ||
3 | class PromoObjectTest extends SapphireTest |
|
4 | { |
|
5 | /** |
|
6 | * @var string |
|
7 | */ |
|
8 | protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml'; |
|
9 | ||
10 | /** |
|
11 | * |
|
12 | */ |
|
13 | public function testGetCMSFields() |
|
14 | { |
|
15 | $object = $this->objFromFixture('PromoObject', 'one'); |
|
16 | $fields = $object->getCMSFields(); |
|
17 | $this->assertInstanceOf('FieldList', $fields); |
|
18 | $this->assertNotNull($fields->dataFieldByName('PromoBlocks')); |
|
19 | } |
|
20 | } |
@@ 3-20 (lines=18) @@ | ||
1 | <?php |
|
2 | ||
3 | class VideoBlockTest extends SapphireTest |
|
4 | { |
|
5 | /** |
|
6 | * @var string |
|
7 | */ |
|
8 | protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml'; |
|
9 | ||
10 | /** |
|
11 | * |
|
12 | */ |
|
13 | public function testGetCMSFields() |
|
14 | { |
|
15 | $object = $this->objFromFixture('VideoBlock', 'one'); |
|
16 | $fields = $object->getCMSFields(); |
|
17 | $this->assertInstanceOf('FieldList', $fields); |
|
18 | $this->assertNotNull($fields->dataFieldByName('VideoID')); |
|
19 | } |
|
20 | } |
@@ 6-25 (lines=20) @@ | ||
3 | /** |
|
4 | * Class PageSectionBlockTest |
|
5 | */ |
|
6 | class PageSectionBlockTest extends SapphireTest |
|
7 | { |
|
8 | ||
9 | /** |
|
10 | * @var string |
|
11 | */ |
|
12 | protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml'; |
|
13 | ||
14 | /** |
|
15 | * |
|
16 | */ |
|
17 | public function testGetCMSFields() |
|
18 | { |
|
19 | $object = $this->objFromFixture('PageSectionBlock', 'one'); |
|
20 | $fields = $object->getCMSFields(); |
|
21 | $this->assertInstanceOf('FieldList', $fields); |
|
22 | $this->assertNotNull($fields->dataFieldByName('Sections')); |
|
23 | } |
|
24 | ||
25 | } |