Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebronner committed Feb 28, 2018
2 parents ad573d1 + 44fccfc commit 60ae6ac
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/Integration/CachedBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -929,4 +929,21 @@ public function testUpdateInvalidatesCache()
$this->assertEquals("Updated Name", $authorAfterUpdate->name);
$this->assertEquals($authorAfterUpdate->name, $uncachedAuthor->name);
}

public function testAccessingGetResultsViaArrayIndexDoesNotError()
{
$author = (new Author)
->where('id', 1)
->get()[0];
$cachedAuthor = (new Author)
->where('id', 1)
->get()[0];
$uncachedAuthor = (new UncachedAuthor)
->where('id', 1)
->get()[0];

$this->assertEquals(1, $author->id);
$this->assertEquals($author, $cachedAuthor);
$this->assertEquals($author->toArray(), $uncachedAuthor->toArray());
}
}

0 comments on commit 60ae6ac

Please sign in to comment.