|
|
@ -411,6 +411,10 @@ trait ActiveRecordTestTrait |
|
|
|
$this->assertTrue($customer->isRelationPopulated('orders')); |
|
|
|
$this->assertTrue($customer->isRelationPopulated('orders')); |
|
|
|
$this->assertEquals(1, count($customer->orders)); |
|
|
|
$this->assertEquals(1, count($customer->orders)); |
|
|
|
$this->assertEquals(1, count($customer->populatedRelations)); |
|
|
|
$this->assertEquals(1, count($customer->populatedRelations)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// https://github.com/yiisoft/yii2/issues/1402 |
|
|
|
|
|
|
|
$orders = $this->callOrderFind()->with('books')->asArray()->all(); |
|
|
|
|
|
|
|
$this->assertEquals(3, count($orders)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testFindLazyVia() |
|
|
|
public function testFindLazyVia() |
|
|
@ -746,4 +750,4 @@ trait ActiveRecordTestTrait |
|
|
|
$customers = $this->callCustomerFind()->where(['status' => false])->all(); |
|
|
|
$customers = $this->callCustomerFind()->where(['status' => false])->all(); |
|
|
|
$this->assertEquals(1, count($customers)); |
|
|
|
$this->assertEquals(1, count($customers)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|