| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function testEchoCreatesVar() |
||
| 14 | { |
||
| 15 | $context = $this->getContext(); |
||
| 16 | |||
| 17 | $statement = new Node\Stmt\Echo_([ |
||
| 18 | new Node\Expr\Assign( |
||
| 19 | new Node\Expr\Variable( |
||
| 20 | new Node\Name("stmtTest") |
||
| 21 | ), |
||
| 22 | $this->newScalarExpr(2) |
||
| 23 | ) |
||
| 24 | ]); |
||
| 25 | |||
| 26 | \PHPSA\nodeVisitorFactory($statement, $context); |
||
| 27 | |||
| 28 | $variable = $context->getSymbol("stmtTest"); |
||
| 29 | |||
| 30 | parent::assertTrue($variable instanceof Variable); |
||
|
|
|||
| 31 | } |
||
| 32 | } |
||
| 33 |
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 theSoncalls the wrong method in the parent class.