ソースを参照

Fix test for PHP 5.3 compatiblity

Marek Kalnik 11 年 前
コミット
d0ec58bb14
1 ファイル変更3 行追加2 行削除
  1. 3 2
      Tests/Controller/CRUDControllerTest.php

+ 3 - 2
Tests/Controller/CRUDControllerTest.php

@@ -2341,8 +2341,9 @@ class CRUDControllerTest extends \PHPUnit_Framework_TestCase
         $args = func_get_args();
 
         // creates equalTo of all arguments passed to this function
-        $argsCheck = array_map(function($item) {
-            return $this->equalTo($item);
+        $phpunit = $this; // PHP 5.3 compatiblity
+        $argsCheck = array_map(function($item) use ($phpunit) {
+            return $phpunit->equalTo($item);
         }, func_get_args());
 
         $mock = $this->admin->expects($this->once())->method('trans');