@@ 9-17 (lines=9) @@ | ||
6 | ||
7 | class CachedBuilderMultipleQueryTest extends IntegrationTestCase |
|
8 | { |
|
9 | public function testCallingAllThenFirstQueriesReturnsDifferingResults() |
|
10 | { |
|
11 | $allAuthors = (new Author)->all(); |
|
12 | $firstAuthor = (new Author)->first(); |
|
13 | ||
14 | $this->assertNotEquals($allAuthors, $firstAuthor); |
|
15 | $this->assertInstanceOf(Author::class, $firstAuthor); |
|
16 | $this->assertInstanceOf(Collection::class, $allAuthors); |
|
17 | } |
|
18 | ||
19 | public function testCallingGetThenFirstQueriesReturnsDifferingResults() |
|
20 | { |
|
@@ 19-27 (lines=9) @@ | ||
16 | $this->assertInstanceOf(Collection::class, $allAuthors); |
|
17 | } |
|
18 | ||
19 | public function testCallingGetThenFirstQueriesReturnsDifferingResults() |
|
20 | { |
|
21 | $allAuthors = (new Author)->get(); |
|
22 | $firstAuthor = (new Author)->first(); |
|
23 | ||
24 | $this->assertNotEquals($allAuthors, $firstAuthor); |
|
25 | $this->assertInstanceOf(Author::class, $firstAuthor); |
|
26 | $this->assertInstanceOf(Collection::class, $allAuthors); |
|
27 | } |
|
28 | ||
29 | public function testUsingDestroyInvalidatesCache() |
|
30 | { |