mirror of
				https://github.com/Mibew/handlebars.php.git
				synced 2025-11-04 12:05:09 +03:00 
			
		
		
		
	Merge branch 'patch-6' of github.com:ulriklystbaek/handlebars.php
Conflicts: tests/Xamin/HandlebarsTest.php
This commit is contained in:
		
						commit
						d731f8d438
					
				@ -952,4 +952,16 @@ class HandlebarsTest extends \PHPUnit_Framework_TestCase
 | 
			
		||||
        $this->assertEquals("'(test)'Test.", $engine->render("{{test '(test)'}}", array()));
 | 
			
		||||
        $this->assertEquals("')'Test.Test.", $engine->render("{{test (test ')')}}", array()));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Test if and unless adding an extra layer when accessing parent
 | 
			
		||||
     */
 | 
			
		||||
    public function testIfUnlessExtraLayer()
 | 
			
		||||
    {
 | 
			
		||||
        $loader = new \Handlebars\Loader\StringLoader();
 | 
			
		||||
        $engine = new \Handlebars\Handlebars(array('loader' => $loader));
 | 
			
		||||
        
 | 
			
		||||
        $this->assertEquals('good', $engine->render('{{#with b}}{{#if this}}{{../../a}}{{/if}}{{/with}}', array('a' => 'good', 'b' => 'stump')));
 | 
			
		||||
        $this->assertEquals('good', $engine->render('{{#with b}}{{#if unless}}{{else}}{{../../a}}{{/if}}{{/with}}', array('a' => 'good', 'b' => 'stump')));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user