瀏覽代碼

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');