1 | <?php |
||
12 | class ExpectationAnnotationParser |
||
13 | { |
||
14 | const DEFAULT_EXPECTATIONS_PATH = "tests/_unique_expectations/"; |
||
15 | const PATH_CONFIG_KEY = 'unique_expectations_path'; |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $config; |
||
20 | |||
21 | /** |
||
22 | * ExpectationAnnotationParser constructor. |
||
23 | * |
||
24 | * @param array $config |
||
25 | * |
||
26 | * @throws \Codeception\Exception\ConfigurationException |
||
27 | */ |
||
28 | public function __construct($config = []) |
||
35 | |||
36 | |||
37 | /** |
||
38 | * @param TestInterface|Cest $test |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function getExpectations(TestInterface $test) |
||
51 | |||
52 | /** |
||
53 | * @param $expectationsPath |
||
54 | * @param array $matches |
||
|
|||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | function getExpectationFullPath($path) |
||
64 | |||
65 | /** |
||
66 | * @param $expectation |
||
67 | * |
||
68 | * @return string |
||
69 | * @throws ParseException |
||
70 | */ |
||
71 | public function parseExpectation($expectation) |
||
88 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.