mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix comp. with 5.3
This commit is contained in:
parent
e357a38946
commit
a910b71a81
@ -262,10 +262,11 @@ class AccessorTest extends TestCase
|
||||
*/
|
||||
public function testCallbackAccessor() {
|
||||
$index = 1;
|
||||
$this->fenom->addAccessorCallback('index', function($name, $template, $vars) use (&$index) {
|
||||
$this->assertInstanceOf('Fenom\Render', $template);
|
||||
$this->assertSame(1, $vars['one']);
|
||||
$this->assertSame('index', $name);
|
||||
$test = $this;
|
||||
$this->fenom->addAccessorCallback('index', function($name, $template, $vars) use (&$index, $test) {
|
||||
$test->assertInstanceOf('Fenom\Render', $template);
|
||||
$test->assertSame(1, $vars['one']);
|
||||
$test->assertSame('index', $name);
|
||||
|
||||
return $index++;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user