@@ -39,7 +39,7 @@ public function testReturnsExistingRecord(): void
3939
4040 $ row = $ this ->model ->firstOrInsert (['email ' => 'derek@world.com ' ]);
4141
42- $ this ->assertNotNull ($ row );
42+ $ this ->assertIsObject ($ row );
4343 $ this ->assertSame ('Derek Jones ' , $ row ->name );
4444 $ this ->assertSame ('derek@world.com ' , $ row ->email );
4545 $ this ->assertSame ('US ' , $ row ->country );
@@ -66,7 +66,7 @@ public function testValuesAreIgnoredWhenRecordExists(): void
6666 ['name ' => 'Should Not Change ' , 'country ' => 'XX ' ],
6767 );
6868
69- $ this ->assertNotFalse ($ row );
69+ $ this ->assertIsObject ($ row );
7070 $ this ->assertSame ('Derek Jones ' , $ row ->name );
7171 $ this ->assertSame ('US ' , $ row ->country );
7272 }
@@ -81,7 +81,7 @@ public function testInsertsNewRecordWhenNotFound(): void
8181 'country ' => 'US ' ,
8282 ]);
8383
84- $ this ->assertNotFalse ($ row );
84+ $ this ->assertIsObject ($ row );
8585 $ this ->assertSame ('new@example.com ' , $ row ->email );
8686 $ this ->seeInDatabase ('user ' , ['email ' => 'new@example.com ' , 'deleted_at ' => null ]);
8787 }
@@ -95,7 +95,7 @@ public function testMergesValuesOnInsert(): void
9595 ['name ' => 'New User ' , 'country ' => 'CA ' ],
9696 );
9797
98- $ this ->assertNotFalse ($ row );
98+ $ this ->assertIsObject ($ row );
9999 $ this ->assertSame ('New User ' , $ row ->name );
100100 $ this ->assertSame ('CA ' , $ row ->country );
101101 $ this ->seeInDatabase ('user ' , [
@@ -119,7 +119,7 @@ public function testAcceptsObjectForValues(): void
119119 $ values ,
120120 );
121121
122- $ this ->assertNotFalse ($ row );
122+ $ this ->assertIsObject ($ row );
123123 $ this ->assertSame ('Object User ' , $ row ->name );
124124 $ this ->assertSame ('DE ' , $ row ->country );
125125 $ this ->seeInDatabase ('user ' , ['email ' => 'object@example.com ' , 'deleted_at ' => null ]);
@@ -134,7 +134,7 @@ public function testAcceptsObjectForAttributes(): void
134134
135135 $ row = $ this ->model ->firstOrInsert ($ attributes );
136136
137- $ this ->assertNotFalse ($ row );
137+ $ this ->assertIsObject ($ row );
138138 $ this ->assertSame ('Derek Jones ' , $ row ->name );
139139 $ this ->seeNumRecords (4 , 'user ' , ['deleted_at ' => null ]);
140140 }
@@ -150,7 +150,7 @@ public function testAcceptsObjectForAttributesAndInsertsWhenNotFound(): void
150150
151151 $ row = $ this ->model ->firstOrInsert ($ attributes );
152152
153- $ this ->assertNotNull ($ row );
153+ $ this ->assertIsObject ($ row );
154154 $ this ->assertSame ('new@example.com ' , $ row ->email );
155155 $ this ->seeInDatabase ('user ' , ['email ' => 'new@example.com ' , 'deleted_at ' => null ]);
156156 }
@@ -183,7 +183,7 @@ protected function doInsert(array $row): bool
183183 ['name ' => 'Race User ' , 'country ' => 'US ' ],
184184 );
185185
186- $ this ->assertNotFalse ($ row );
186+ $ this ->assertIsObject ($ row );
187187 $ this ->assertSame ('race@example.com ' , $ row ->email );
188188 // The "other process" inserted exactly one record.
189189 $ this ->seeNumRecords (1 , 'user ' , ['email ' => 'race@example.com ' , 'deleted_at ' => null ]);
@@ -218,7 +218,7 @@ protected function doInsert(array $row): bool
218218 ['name ' => 'Race User ' , 'country ' => 'US ' ],
219219 );
220220
221- $ this ->assertNotFalse ($ row );
221+ $ this ->assertIsObject ($ row );
222222 $ this ->assertSame ('race@example.com ' , $ row ->email );
223223 $ this ->seeNumRecords (1 , 'user ' , ['email ' => 'race@example.com ' , 'deleted_at ' => null ]);
224224 }
0 commit comments