1 | <?php |
||
3 | class MultiDomainTest extends SapphireTest |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * Set up some test domain configuration |
||
7 | * |
||
8 | * {@inheritDoc} |
||
9 | */ |
||
10 | public function setUp() |
||
27 | |||
28 | /** |
||
29 | * Test that a MultiDomainDomain can be returned from the configured domains |
||
30 | */ |
||
31 | public function testGetDomain() |
||
36 | |||
37 | /** |
||
38 | * Test that all domains can be returned, with or without the primary domain |
||
39 | * |
||
40 | * @dataProvider getAllDomainsProvider |
||
41 | * @param bool $withPrimary |
||
42 | */ |
||
43 | public function testGetAllDomains($withPrimary) |
||
52 | |||
53 | /** |
||
54 | * @return array[] |
||
55 | */ |
||
56 | public function getAllDomainsProvider() |
||
63 | |||
64 | /** |
||
65 | * Test that the primary domain can be returned |
||
66 | */ |
||
67 | public function testGetPrimaryDomain() |
||
73 | |||
74 | /** |
||
75 | * Test that the correct domain can be returned by a provided URL |
||
76 | */ |
||
77 | public function testDomainForUrl() |
||
83 | |||
84 | /** |
||
85 | * Test that if a URL doesn't match any domain then the primary domain is returned |
||
86 | */ |
||
87 | public function testDomainForUrlDefaultsToPrimaryDomain() |
||
91 | |||
92 | public function tearDown() |
||
97 | } |
||
98 |
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.