Conditions | 1 |
Paths | 1 |
Total Lines | 49 |
Code Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function testExecute() : void |
||
12 | { |
||
13 | $process = new Process([ |
||
14 | 'bin/usage-finder', |
||
15 | 'find', |
||
16 | 'tests/example', |
||
17 | 'Doctrine\Common\Collections\Collection::slice', |
||
18 | ], __DIR__ . '/..'); |
||
19 | |||
20 | $process->mustRun(); |
||
21 | |||
22 | $output = $process->getOutput(); |
||
23 | |||
24 | self::assertStringContainsString( |
||
|
|||
25 | 'Searching for Doctrine\Common\Collections\Collection::slice in tests/example.', |
||
26 | $output |
||
27 | ); |
||
28 | |||
29 | self::assertStringContainsString( |
||
30 | 'Found usage in src/AppCode.php on line 14.', |
||
31 | $output |
||
32 | ); |
||
33 | |||
34 | self::assertStringContainsString( |
||
35 | '->slice(0, 1);', |
||
36 | $output |
||
37 | ); |
||
38 | |||
39 | self::assertStringContainsString( |
||
40 | 'Found usage in src/AppCode.php on line 17.', |
||
41 | $output |
||
42 | ); |
||
43 | |||
44 | self::assertStringContainsString( |
||
45 | '->slice(0, 2);', |
||
46 | $output |
||
47 | ); |
||
48 | |||
49 | self::assertStringContainsString( |
||
50 | 'Found usage in src/AppCode.php on line 20.', |
||
51 | $output |
||
52 | ); |
||
53 | |||
54 | self::assertStringContainsString( |
||
55 | '->slice(0, 3);', |
||
56 | $output |
||
57 | ); |
||
58 | |||
59 | self::assertRegExp('/Finished in (.*)ms/', $output); |
||
60 | } |
||
62 |
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.