| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function testNoAddNewOrExistingButtons() |
||
| 11 | { |
||
| 12 | $fields = DMSDocumentCartSubmission::create()->getCMSFields(); |
||
| 13 | $gridField = $fields->fieldByName('Root.Items.Items'); |
||
| 14 | $this->assertInstanceOf('GridField', $gridField); |
||
| 15 | |||
| 16 | $config = $gridField->getConfig(); |
||
| 17 | $this->assertNull($config->getComponentByType('GridFieldAddExistingAutocompleter')); |
||
| 18 | $this->assertNull($config->getComponentByType('GridFieldAddNewButton')); |
||
| 19 | } |
||
| 20 | |||
| 32 |
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.