Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
1 | <?php |
||
5 | 1 | public function testGetCMSFields() |
|
6 | { |
||
7 | 1 | $poiMapPage = new POIMapPage(); |
|
8 | |||
9 | // check extensions |
||
10 | 1 | $this->assertTrue($poiMapPage->hasExtension('MapExtension')); |
|
11 | 1 | $this->assertTrue($poiMapPage->hasExtension('PointsOfInterestLayerExtension')); |
|
12 | |||
13 | // check that the location tab has been removed |
||
14 | 1 | $fields = $poiMapPage->getCMSFields(); |
|
15 | 1 | $tab = $fields->findOrMakeTab('Root'); |
|
16 | 1 | $fields = $tab->FieldList(); |
|
17 | 1 | $names = array(); |
|
18 | 1 | foreach ($fields as $field) { |
|
19 | 1 | $names[] = $field->getName(); |
|
20 | 1 | } |
|
21 | 1 | $this->assertNotContains('Location', $names); |
|
22 | 1 | } |
|
23 | } |
||
24 |