1 | <?php |
||
13 | ['say.hello', ['name' => 'nekufa'], ['text' => 'Hola, nekufa']], |
||
14 | ['say.hello', ['name' => 'vasiliy'], ['text' => 'Vasya, privet!']], |
||
15 | ['web.services', [], ['services' => ['web', 'tester', 'basis']]] |
||
16 | ]; |
||
17 | |||
18 | public $data = [ |
||
19 | 'web.services' => [ |
||
20 | ['id' => 1, 'name' => 'tester'], |
||
21 | ['id' => 2, 'name' => 'basis'], |
||
22 | ['id' => 3, 'name' => 'web'], |
||
23 | ], |
||
24 | 'tester.data' => [ |
||
25 | ['id' => 3, 'value' => 'test'], |
||
26 | ['id' => 4, 'value' => 'test'], |
||
27 | ], |
||
28 | ]; |
||
29 | |||
30 | public function testMagicProperties() |
||
31 | { |
||
32 | foreach ($this->mocks as [$job, $params, $result]) { |
||
33 | $jobResult = get_object_vars($this->dispatch($job, $params)); |
||
34 | $this->assertSame($jobResult, $result); |
||
35 | } |
||
36 | } |
||
51 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.