PSR1 classes have a namespace declaration.
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 DMSDocumentAdminExtensionTest extends FunctionalTest |
||
0 ignored issues
–
show
|
|||
4 | { |
||
5 | protected $requiredExtensions = array( |
||
6 | 'DMSDocumentAdmin' => array('DMSDocumentAdminExtension') |
||
7 | ); |
||
8 | |||
9 | public function setUp() |
||
10 | { |
||
11 | parent::setUp(); |
||
12 | $this->logInWithPermission('ADMIN'); |
||
13 | } |
||
14 | |||
15 | /** |
||
16 | * Ensure that the cart submission tab is available in the DMS model admin |
||
17 | */ |
||
18 | public function testHasCartSubmissionsTab() |
||
19 | { |
||
20 | $response = $this->get('admin/documents'); |
||
21 | $this->assertEquals(200, $response->getStatusCode()); |
||
22 | $this->assertContains('Cart Submission', (string) $response->getBody()); |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Ensure that the "add new" button has been removed |
||
27 | */ |
||
28 | public function testNoAddButtonInGridField() |
||
29 | { |
||
30 | $response = $this->get('admin/documents/DMSDocumentCartSubmission'); |
||
31 | $this->assertEquals(200, $response->getStatusCode()); |
||
32 | $this->assertNotContains('Add Cart Submission', (string) $response->getBody()); |
||
33 | } |
||
34 | } |
||
35 |
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.