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()); |
||
0 ignored issues
–
show
The method
assertEquals() does not seem to exist on object<DMSDocumentAdminExtensionTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.
Loading history...
|
|||
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()); |
||
0 ignored issues
–
show
The method
assertEquals() does not seem to exist on object<DMSDocumentAdminExtensionTest> .
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed.
Loading history...
|
|||
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.