1 | <?php |
||
25 | class EdgeTest extends TestCase |
||
26 | { |
||
27 | /** |
||
28 | * Tears down the fixture, for example, closes a network connection. |
||
29 | * This method is called after a test is executed. |
||
30 | */ |
||
31 | protected function tearDown() : void |
||
35 | |||
36 | /** |
||
37 | * Tests the construct method |
||
38 | * |
||
39 | * @covers \phpDocumentor\GraphViz\Edge::__construct |
||
40 | */ |
||
41 | public function testConstruct() : void |
||
60 | |||
61 | /** |
||
62 | * Tests the create method |
||
63 | * |
||
64 | * @covers \phpDocumentor\GraphViz\Edge::create |
||
65 | */ |
||
66 | public function testCreate() : void |
||
73 | |||
74 | /** |
||
75 | * Tests whether the getFrom method returns the same node as passed |
||
76 | * in the create method |
||
77 | * |
||
78 | * @covers \phpDocumentor\GraphViz\Edge::getFrom |
||
79 | */ |
||
80 | public function testGetFrom() : void |
||
86 | |||
87 | /** |
||
88 | * Tests the getTo method returns the same node as passed |
||
89 | * in the create method |
||
90 | * |
||
91 | * @covers \phpDocumentor\GraphViz\Edge::getTo |
||
92 | */ |
||
93 | public function testGetTo() : void |
||
99 | |||
100 | /** |
||
101 | * Tests the magic __call method, to work as described, return the object |
||
102 | * instance for a setX method, return the value for an getX method, and null |
||
103 | * for the remaining method calls |
||
104 | * |
||
105 | * @covers \phpDocumentor\GraphViz\Edge::__call |
||
106 | * @covers \phpDocumentor\GraphViz\Edge::setAttribute |
||
107 | * @covers \phpDocumentor\GraphViz\Edge::getAttribute |
||
108 | */ |
||
109 | public function testCall() : void |
||
117 | |||
118 | /** |
||
119 | * @covers \phpDocumentor\GraphViz\Edge::getAttribute |
||
120 | * @covers \phpDocumentor\GraphViz\AttributeNotFound::__construct |
||
121 | */ |
||
122 | public function testGetNonExistingAttributeThrowsAttributeNotFound() : void |
||
131 | |||
132 | /** |
||
133 | * Tests whether the magic __toString method returns a well formatted string |
||
134 | * as specified in the DOT standard |
||
135 | * |
||
136 | * @covers \phpDocumentor\GraphViz\Edge::__toString |
||
137 | */ |
||
138 | public function testToString() : void |
||
153 | } |
||
154 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: