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