Browse Source

corrected assertations for test on #1310

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
47705f0bc9
  1. 10
      tests/unit/framework/ar/ActiveRecordTestTrait.php
  2. 9
      tests/unit/framework/redis/ActiveRecordTest.php

10
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()

9
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()
{

Loading…
Cancel
Save