From 47705f0bc950cbe8c7dad233be2f37eec8a18553 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sun, 24 Nov 2013 20:58:28 +0100 Subject: [PATCH] corrected assertations for test on #1310 --- tests/unit/framework/ar/ActiveRecordTestTrait.php | 10 ++++++---- tests/unit/framework/redis/ActiveRecordTest.php | 9 +++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/unit/framework/ar/ActiveRecordTestTrait.php b/tests/unit/framework/ar/ActiveRecordTestTrait.php index 417d97c..ea4e961 100644 --- a/tests/unit/framework/ar/ActiveRecordTestTrait.php +++ b/tests/unit/framework/ar/ActiveRecordTestTrait.php @@ -428,10 +428,11 @@ trait ActiveRecordTestTrait $this->assertEquals(3, $order->itemsInOrder1[1]->id); $this->assertEquals(4, $order->itemsInOrder1[2]->id); - $order = $orders[3]; + $order = $orders[2]; $this->assertEquals(3, $order->id); $this->assertTrue($order->isRelationPopulated('itemsInOrder1')); - $this->assertEquals(0, count($order->itemsInOrder1)); + $this->assertEquals(1, count($order->itemsInOrder1)); + $this->assertEquals(2, $order->itemsInOrder1[0]->id); } // different order in via table @@ -455,10 +456,11 @@ trait ActiveRecordTestTrait $this->assertEquals(3, $order->itemsInOrder2[1]->id); $this->assertEquals(4, $order->itemsInOrder2[2]->id); - $order = $orders[3]; + $order = $orders[2]; $this->assertEquals(3, $order->id); $this->assertTrue($order->isRelationPopulated('itemsInOrder2')); - $this->assertEquals(0, count($order->itemsInOrder2)); + $this->assertEquals(1, count($order->itemsInOrder2)); + $this->assertEquals(2, $order->itemsInOrder2[0]->id); } public function testLink() diff --git a/tests/unit/framework/redis/ActiveRecordTest.php b/tests/unit/framework/redis/ActiveRecordTest.php index 2a1b808..4b15cd2 100644 --- a/tests/unit/framework/redis/ActiveRecordTest.php +++ b/tests/unit/framework/redis/ActiveRecordTest.php @@ -105,6 +105,15 @@ class ActiveRecordTest extends RedisTestCase $this->markTestSkipped('Redis does not store/find boolean values correctly.'); } + public function testFindEagerViaRelationPreserveOrder() + { + $this->markTestSkipped('Redis does not support orderBy.'); + } + + public function testFindEagerViaRelationPreserveOrderB() + { + $this->markTestSkipped('Redis does not support orderBy.'); + } public function testSatisticalFind() {