From a910b71a810ce67791a55b4b9dbff5b15f24b3aa Mon Sep 17 00:00:00 2001 From: bzick Date: Thu, 9 Jun 2016 14:30:20 +0300 Subject: [PATCH] Fix comp. with 5.3 --- tests/cases/Fenom/AccessorTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/cases/Fenom/AccessorTest.php b/tests/cases/Fenom/AccessorTest.php index e85a082..ff82496 100644 --- a/tests/cases/Fenom/AccessorTest.php +++ b/tests/cases/Fenom/AccessorTest.php @@ -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++; });