| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 5 | public function testGetCMSFields() |
||
| 6 | { |
||
| 7 | $gi = new GalleryImage(); |
||
| 8 | $tab = $gi->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('Title', 'Aperture', 'ShutterSpeed', 'TakenAt', |
||
| 15 | 'ISO', 'Orientation', 'Image'); |
||
| 16 | $this->assertEquals($expected, $names); |
||
|
1 ignored issue
–
show
|
|||
| 17 | } |
||
| 18 | |||
| 29 |
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.