Skip to content

Commit

Permalink
[2.1][TwigBridge] Fixes Issue #7342 in TwigBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Bender authored and fabpot committed Mar 13, 2013
1 parent d77b97c commit c423f16
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Bridge/Twig/NodeVisitor/Scope.php
Expand Up @@ -32,6 +32,7 @@ class Scope
*/
public function __construct(Scope $parent = null)
{
$this->data = array();
$this->parent = $parent;
$this->left = false;
}
Expand Down
16 changes: 16 additions & 0 deletions src/Symfony/Bridge/Twig/Tests/NodeVisitor/ScopeTest.php
@@ -0,0 +1,16 @@
<?php

namespace Symfony\Bridge\Twig\Tests\NodeVisitor;

use Symfony\Bridge\Twig\NodeVisitor\Scope;
use Symfony\Bridge\Twig\Tests\TestCase;

class ScopeTest extends TestCase
{
public function testScopeInitiation()
{
$scope = new Scope();
$scope->enter();
$this->assertNull($scope->get('test'));
}
}

0 comments on commit c423f16

Please sign in to comment.