@@ 5-17 (lines=13) @@ | ||
2 | ||
3 | class GalleryFolderTest extends SapphireTest |
|
4 | { |
|
5 | public function testGetCMSFields() |
|
6 | { |
|
7 | $gf = new GalleryFolder(); |
|
8 | $tab = $gf->getCMSFields()->fieldByName('Root.Main'); |
|
9 | $fields = $tab->FieldList(); |
|
10 | $names = array(); |
|
11 | foreach ($fields as $field) { |
|
12 | array_push($names, $field->getName()); |
|
13 | } |
|
14 | $expected = array('InstallWarningHeader', 'Title', 'URLSegment', |
|
15 | 'MenuTitle', 'BriefIntroduction', 'Content'); |
|
16 | $this->assertEquals($expected, $names); |
|
17 | } |
|
18 | ||
19 | public function testSummary() |
|
20 | { |
@@ 7-19 (lines=13) @@ | ||
4 | { |
|
5 | protected static $fixture_file = 'ss3gallery/tests/ss3gallery.yml'; |
|
6 | ||
7 | public function testGetCMSFields() |
|
8 | { |
|
9 | $gp = new GalleryPage(); |
|
10 | $tab = $gp->getCMSFields()->fieldByName('Root.Main'); |
|
11 | $fields = $tab->FieldList(); |
|
12 | $names = array(); |
|
13 | foreach ($fields as $field) { |
|
14 | array_push($names, $field->getName()); |
|
15 | } |
|
16 | $expected = array('InstallWarningHeader', 'Title', 'URLSegment', |
|
17 | 'MenuTitle', 'BriefIntroduction', 'Content'); |
|
18 | $this->assertEquals($expected, $names); |
|
19 | } |
|
20 | ||
21 | public function testGalleryWithMappedImages() |
|
22 | { |