1 | <?php |
||||
2 | |||||
3 | namespace Nip\Router\Tests\Legacy\Route; |
||||
4 | |||||
5 | use Nip\Router\Route\Route; |
||||
6 | use Nip\Router\Tests\AbstractTest; |
||||
7 | |||||
8 | /** |
||||
9 | * Class AbstractRouteTraitTest |
||||
10 | * @package Nip\Router\Tests\Legacy\Route |
||||
11 | */ |
||||
12 | class AbstractRouteTraitTest extends AbstractTest |
||||
13 | { |
||||
14 | public function testSetParamsNotOverwriteMapDefaults() |
||||
15 | { |
||||
16 | $route = new Route('/{controller}/{action?index}'); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||
17 | self::assertSame(['action' => 'index'], $route->getDefaults()); |
||||
18 | |||||
19 | $params = ['test' => 9]; |
||||
20 | $route->setParams($params); |
||||
0 ignored issues
–
show
The function
Nip\Router\Route\AbstractRoute::setParams() has been deprecated: Use setDefaults
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
21 | self::assertEquals(['test' => 9, 'action' => 'index'], $route->getDefaults()); |
||||
22 | } |
||||
23 | |||||
24 | public function testSetParams() |
||||
25 | { |
||||
26 | $route = new Route(); |
||||
27 | self::assertSame([], $route->getDefaults()); |
||||
28 | |||||
29 | $params = ['test' => 9]; |
||||
30 | $route->setParams($params); |
||||
0 ignored issues
–
show
The function
Nip\Router\Route\AbstractRoute::setParams() has been deprecated: Use setDefaults
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
31 | self::assertEquals($params, $route->getDefaults()); |
||||
32 | } |
||||
33 | } |
||||
34 |