Completed
Pull Request — 3.1 (#3)
by Gordon
02:49
created

testUpdateCMSFields()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 13
rs 9.4286
cc 2
eloc 9
nc 2
nop 0
1
<?php
2
3
class ImagePointOfInterestExtensionTest extends SapphireTest
4
{
5
    public function setUpOnce()
6
    {
7
        $this->requiredExtensions = array(
8
            'ImagePotTestPageTO' => array('MapExtension', 'ImagePointOfInterestExtension'),
9
        );
10
        parent::setUpOnce();
11
    }
12
13
    public function testUpdateCMSFields()
14
    {
15
        $page = new ImagePotTestPageTO();
16
        $fields = $page->getCMSFields();
17
        $tab = $fields->findOrMakeTab('Root.Main');
18
        $fields = $tab->FieldList();
19
        $names = array();
20
        foreach ($fields as $field) {
21
            $names[] = $field->getName();
22
        }
23
24
        error_log(print_r($names, 1));
25
    }
26
}
27
28
class ImagePotTestPageTO extends Page implements TestOnly
29
{
30
}
31