Trismegiste\Mondrian\Visitor\VisitorGateway::enterNode PHP Method

enterNode() public method

public enterNode ( PhpParser\Node $node )
$node PhpParser\Node
    public function enterNode(Node $node)
    {
        if ($this->debug) {
            printf("Entering %s %s %s %d\n", $this->stateStack[0]['key'], $node->getType(), $node->name, count($this->stateStack));
        }
        return $this->stateStack[0]['state']->enter($node);
    }

Usage Example

 public function testEnteringNode()
 {
     $state = $this->getMockState('key');
     $state->expects($this->once())->method('enter');
     $this->buildVisitor([$state]);
     $node = $this->getMock('PhpParser\\Node');
     $this->sut->enterNode($node);
 }