These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace DoctrineModuleTest\Mvc\Router\Console; |
||
6 | |||
7 | use DoctrineModule\Mvc\Router\Console\SymfonyCli; |
||
8 | use Laminas\Console\Request; |
||
9 | use Laminas\Router\RouteMatch; |
||
10 | use PHPUnit\Framework\TestCase; |
||
11 | use Symfony\Component\Console\Application; |
||
12 | |||
13 | /** |
||
14 | * Tests for {@see \DoctrineModule\Mvc\Router\Console\SymfonyCli} |
||
15 | * |
||
16 | * @covers \DoctrineModule\Mvc\Router\Console\SymfonyCli |
||
17 | */ |
||
18 | class SymfonyCliTest extends TestCase |
||
19 | { |
||
20 | /** @var SymfonyCli */ |
||
21 | protected $route; |
||
22 | |||
23 | protected function setUp() : void |
||
24 | { |
||
25 | $this->route = new SymfonyCli(new Application()); |
||
26 | } |
||
27 | |||
28 | public function testMatching() : void |
||
29 | { |
||
30 | $this->assertInstanceOf( |
||
0 ignored issues
–
show
|
|||
31 | RouteMatch::class, |
||
32 | $this->route->match(new Request(['scriptname.php', 'list'])) |
||
33 | ); |
||
34 | } |
||
35 | |||
36 | public function testMatchingWithParams() : void |
||
37 | { |
||
38 | $this->assertInstanceOf( |
||
0 ignored issues
–
show
The method
assertInstanceOf() does not seem to exist on object<DoctrineModuleTes...Console\SymfonyCliTest> .
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...
|
|||
39 | RouteMatch::class, |
||
40 | $this->route->match(new Request(['scriptname.php', 'list', '--help'])) |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | public function testNotMatching() : void |
||
45 | { |
||
46 | $this->assertNull($this->route->match(new Request(['scriptname.php', 'unknowncommand']))); |
||
47 | } |
||
48 | } |
||
49 |
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.