Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2.024 |
Changes | 0 |
1 | <?php |
||
14 | 2 | public function testMakeSurePublicCantAccess($userCb) { |
|
15 | // Set current user |
||
16 | 2 | $user = $userCb(); |
|
17 | 2 | $this->flushSession(); |
|
18 | 2 | Route::enableFilters(); |
|
19 | 2 | if ($user) { |
|
20 | $this->be($user); |
||
21 | } |
||
22 | |||
23 | // get admin homepage |
||
24 | 2 | $this->client->request('GET', '/admin'); |
|
25 | |||
26 | 2 | $this->assertTrue($this->client->getResponse()->isRedirection()); |
|
27 | |||
28 | 2 | Route::disableFilters(); |
|
29 | 2 | } |
|
30 | |||
58 |
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.