1 | <?php |
||
3 | class DMSGridFieldAddNewButtonTest extends SapphireTest |
||
|
|||
4 | { |
||
5 | protected static $fixture_file = 'dms/tests/dmstest.yml'; |
||
6 | |||
7 | /** |
||
8 | * @var DMSGridFieldAddNewButton |
||
9 | */ |
||
10 | protected $button; |
||
11 | |||
12 | /** |
||
13 | * @var GridField |
||
14 | */ |
||
15 | protected $gridField; |
||
16 | |||
17 | public function setUp() |
||
25 | |||
26 | /** |
||
27 | * Test that when no document set ID is present then it is not added to the URL for "add document" |
||
28 | */ |
||
29 | public function testNoDocumentSetIdInAddUrlWhenNotProvided() |
||
33 | |||
34 | /** |
||
35 | * Test that when a document set ID is provided, it is added onto the "add document" link |
||
36 | */ |
||
37 | public function testDocumentSetIdAddedToLinkWhenProvided() |
||
42 | |||
43 | /** |
||
44 | * If a set is saved and associated to a page, that page's ID should be added to the "add document" link to help |
||
45 | * to ensure the user gets redirected back to the correct place afterwards |
||
46 | */ |
||
47 | public function testPageIdIsAddedWhenAvailableViaDocumentSetRelationship() |
||
68 | |||
69 | /** |
||
70 | * Returns the HTML result of the "add new" button, used for DRY in test class |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | protected function getButtonHtml() |
||
79 | } |
||
80 |
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.