Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
4 | public function testGetCMSFields() { |
||
5 | $poiMapPage = new POIMapPage(); |
||
6 | |||
7 | // check extensions |
||
8 | $this->assertTrue($poiMapPage->hasExtension('MapExtension')); |
||
9 | $this->assertTrue($poiMapPage->hasExtension('PointsOfInterestLayerExtension')); |
||
10 | |||
11 | // check that the location tab has been removed |
||
12 | $fields = $poiMapPage->getCMSFields(); |
||
13 | $tab = $fields->findOrMakeTab('Root'); |
||
14 | $fields = $tab->FieldList(); |
||
15 | $names = array(); |
||
16 | foreach ($fields as $field) { |
||
17 | $names[] = $field->getName(); |
||
18 | } |
||
19 | $this->assertNotContains('Location', $names); |
||
20 | } |
||
21 | |||
23 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.