Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Apr 3, 2017
1 parent e0e07c9 commit 7ab2a1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/framework/db/ActiveRecordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,9 @@ public function testIndexByAfterLoadingRelations()
{
$orderClass = $this->getOrderClass();

$this->assertNotEmpty($orderClass::find()->with('customer')->indexBy('customer.id')->all());
$this->assertNotEmpty($orderClass::find()->with('customer')->indexBy(function($order) {
return $order->product->id;
})->all());
}


Expand Down

0 comments on commit 7ab2a1e

Please sign in to comment.