ソースを参照

Merge pull request #5849 from cakephp/3.0-hhvm-fixes

3.0 hhvm fixes
ADmad 11 年 前
コミット
b97de0b97d

+ 0 - 2
.travis.yml

@@ -17,8 +17,6 @@ services:
   - redis-server
 
 matrix:
-  allow_failures:
-    - php: hhvm-nightly
   fast_finish: true
   include:
     - php: 5.4

+ 3 - 1
src/Collection/CollectionTrait.php

@@ -390,9 +390,11 @@ trait CollectionTrait
                 return;
             }
 
+            $children = [];
             foreach ($values as $id) {
-                $parents[$key]['children'][] =& $parents[$id];
+                $children[] =& $parents[$id];
             }
+            $parents[$key]['children'] = $children;
         };
 
         $collection = new MapReduce($this, $mapper, $reducer);

+ 9 - 2
tests/TestCase/Error/ExceptionRendererTest.php

@@ -137,6 +137,14 @@ class MissingWidgetThingException extends NotFoundException
 }
 
 /**
+ * Exception class for testing app error handlers and custom errors.
+ *
+ */
+class MissingWidgetThing extends \Exception
+{
+}
+
+/**
  * ExceptionRendererTest class
  *
  */
@@ -624,8 +632,7 @@ class ExceptionRendererTest extends TestCase
      */
     public function testExceptionNameMangling()
     {
-        $exception = $this->getMock('Exception', [], ['Bad things', 404], 'MissingWidgetThing');
-        $exceptionRenderer = new MyCustomExceptionRenderer($exception);
+        $exceptionRenderer = new MyCustomExceptionRenderer(new MissingWidgetThing());
 
         $result = $exceptionRenderer->render()->body();
         $this->assertContains('widget thing is missing', $result);