/**
  * {@inheritdoc}
  */
 protected function doLeaveNode(\Twig_Node $node, \Twig_Environment $env)
 {
     if ($node instanceof TransDefaultDomainNode) {
         return false;
     }
     if ($node instanceof \Twig_Node_Block || $node instanceof \Twig_Node_Module) {
         $this->scope = $this->scope->leave();
     }
     return $node;
 }
Example #2
0
 public function testScopeInitiation()
 {
     $scope = new Scope();
     $scope->enter();
     $this->assertNull($scope->get('test'));
 }