1 | <?php |
||
33 | class AttributeTest extends BaseGraphTest { |
||
34 | |||
35 | /** |
||
36 | * |
||
37 | * @var Attribute |
||
38 | */ |
||
39 | private $Attribute; |
||
40 | |||
41 | /** |
||
42 | * Prepares the environment before running a test. |
||
43 | */ |
||
44 | protected function setUp() : void { |
||
48 | |||
49 | /** |
||
50 | * Cleans up the environment after running a test. |
||
51 | */ |
||
52 | protected function tearDown() : void { |
||
56 | |||
57 | /** |
||
58 | * Tests Attribute->__construct() |
||
59 | */ |
||
60 | public function test__construct() { |
||
64 | |||
65 | /** |
||
66 | * Tests Attribute->build() |
||
67 | */ |
||
68 | public function testBuild() { |
||
81 | |||
82 | /** |
||
83 | * Tests Attribute::getAllowedNames() |
||
84 | */ |
||
85 | public function testGetAllowedNames() { |
||
88 | |||
89 | /** |
||
90 | * Tests Attribute::getDefaultValue() |
||
91 | */ |
||
92 | public function testGetDefaultValue() { |
||
96 | |||
97 | /** |
||
98 | * Tests Attribute::getType() |
||
99 | */ |
||
100 | public function testGetType() { |
||
103 | |||
104 | /** |
||
105 | * Tests Attribute->getValue() |
||
106 | */ |
||
107 | public function testGetValue() { |
||
110 | |||
111 | /** |
||
112 | * Tests Attribute->setName() |
||
113 | */ |
||
114 | public function testSetName() { |
||
118 | |||
119 | /** |
||
120 | * Tests Attribute->setValue() |
||
121 | * |
||
122 | * @depends testSetName |
||
123 | */ |
||
124 | public function testSetValue() { |
||
129 | } |
||
130 | |||
131 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.