Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function testDoStatementCreatesVar() |
||
37 | { |
||
38 | $context = $this->getContext(); |
||
39 | |||
40 | $statement = new Node\Stmt\Do_( |
||
41 | new Node\Expr\BinaryOp\Equal($this->newScalarExpr(1), $this->newScalarExpr(1)), |
||
42 | ["stmts" => |
||
43 | new Node\Expr\Assign( |
||
44 | new Node\Expr\Variable( |
||
45 | new Node\Name("stmtTest") |
||
46 | ), |
||
47 | $this->newScalarExpr(2) |
||
48 | )] |
||
49 | ); |
||
50 | |||
51 | \PHPSA\nodeVisitorFactory($statement, $context); |
||
52 | |||
53 | $variable = $context->getSymbol("stmtTest"); |
||
54 | |||
55 | self::assertTrue($variable instanceof Variable); |
||
56 | } |
||
57 | } |
||
58 |