1 | <?php |
||
35 | class PropertiesHandlerTest extends TestCase |
||
36 | { |
||
37 | use PropertiesHandlerTestProvider; |
||
38 | |||
39 | /** |
||
40 | * @testdox Uses getters and setters methods in order to access and set values to class properties |
||
41 | * @dataProvider getAccesiblePropertiesProvider |
||
42 | */ |
||
43 | public function testGetAccesibleProperties($expected, $obj, $propertyName) |
||
48 | |||
49 | /** |
||
50 | * @testdox Can set properties with setters. |
||
51 | * @param mixed|null $expected |
||
52 | * @param mixed $obj |
||
53 | * @param string $propertyName |
||
54 | * @param mixed $value |
||
55 | * |
||
56 | * @return void |
||
57 | * @dataProvider setAccesiblePropertiesProvider |
||
58 | */ |
||
59 | public function testSetAccesibleProperties($expected, $obj, $propertyName, $value = null) |
||
72 | |||
73 | /** |
||
74 | * @testdox Informs when trying to access inexistent or inaccesible properties (catchable exception) |
||
75 | * @expectedException BadMethodCallException |
||
76 | * @dataProvider unaccesiblePropertiesProvider |
||
77 | */ |
||
78 | public function testUnaccesibleProperties($obj, $propertyName, $value = null) |
||
90 | } |
||
91 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.