These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | class DMSTaxonomyTypeExtensionTest extends SapphireTest |
||
0 ignored issues
–
show
|
|||
4 | { |
||
5 | protected $usesDatabase = true; |
||
6 | |||
7 | protected $requiredExtensions = array( |
||
8 | 'TaxonomyType' => array('DMSTaxonomyTypeExtension') |
||
9 | ); |
||
10 | |||
11 | /** |
||
12 | * Ensure that the configurable list of default records are created |
||
13 | */ |
||
14 | public function testDefaultRecordsAreCreated() |
||
15 | { |
||
16 | Config::inst()->update('DMSTaxonomyTypeExtension', 'default_records', array('Food', 'Beverage', 'Books')); |
||
17 | |||
18 | TaxonomyType::create()->requireDefaultRecords(); |
||
19 | |||
20 | $this->assertDOSContains( |
||
21 | array( |
||
22 | array('Name' => 'Food'), |
||
23 | array('Name' => 'Beverage'), |
||
24 | array('Name' => 'Books'), |
||
25 | ), |
||
26 | TaxonomyType::get() |
||
27 | ); |
||
28 | } |
||
29 | } |
||
30 |
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.