File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
tests/Integration/CachedBuilder Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,27 @@ class FirstTest extends IntegrationTestCase
19
19
{
20
20
public function testFirstReturnsAllAttributesForModel ()
21
21
{
22
- $ author = (new Author )->where ("id " , "= " , 1 )->first ();
23
- $ uncachedAuthor = (new UncachedAuthor )->where ("id " , "= " , 1 )->first ();
22
+ $ author = (new Author )
23
+ ->where ("id " , "= " , 1 )
24
+ ->first ();
25
+ $ uncachedAuthor = (new UncachedAuthor )
26
+ ->where ("id " , "= " , 1 )
27
+ ->first ();
24
28
25
29
$ this ->assertEquals ($ author ->id , $ uncachedAuthor ->id );
26
30
$ this ->assertEquals ($ author ->created_at , $ uncachedAuthor ->created_at );
27
31
$ this ->assertEquals ($ author ->updated_at , $ uncachedAuthor ->updated_at );
28
32
$ this ->assertEquals ($ author ->email , $ uncachedAuthor ->email );
29
33
$ this ->assertEquals ($ author ->name , $ uncachedAuthor ->name );
30
34
}
35
+
36
+ public function testFirstIsNotTheSameAsAll ()
37
+ {
38
+ $ authors = (new Author )
39
+ ->all ();
40
+ $ author = (new Author )
41
+ ->first ();
42
+
43
+ $ this ->assertNotEquals ($ authors , $ author );
44
+ }
31
45
}
You can’t perform that action at this time.
0 commit comments