Browse Source

Fixed some broken tests in HHVM for different behavior in SplFixedArray

Jose Lorenzo Rodriguez 11 years ago
parent
commit
78ac76f6b3
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/ORM/ResultSet.php
  2. 1 1
      tests/TestCase/ORM/Behavior/CounterCacheBehaviorTest.php

+ 1 - 1
src/ORM/ResultSet.php

@@ -217,7 +217,7 @@ class ResultSet implements ResultSetInterface
      */
     public function valid()
     {
-        if (isset($this->_results[$this->_index])) {
+        if ($this->_results[$this->_index] !== null) {
             $this->_current = $this->_results[$this->_index];
             return true;
         }

+ 1 - 1
tests/TestCase/ORM/Behavior/CounterCacheBehaviorTest.php

@@ -385,7 +385,7 @@ class CounterCacheBehaviorTest extends TestCase
      */
     protected function _getUser($id = 1)
     {
-        return $this->user->find('all')->where(['id' => $id])->first();
+        return $this->user->get($id);
     }
 
     /**