@@ -66,7 +66,7 @@ public function testValuesAreIgnoredWhenRecordExists(): void
6666 ['name ' => 'Should Not Change ' , 'country ' => 'XX ' ],
6767 );
6868
69- $ this ->assertNotNull ($ row );
69+ $ this ->assertNotFalse ($ 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 ->assertNotNull ($ row );
84+ $ this ->assertNotFalse ($ 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 ->assertNotNull ($ row );
98+ $ this ->assertNotFalse ($ 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 ->assertNotNull ($ row );
122+ $ this ->assertNotFalse ($ 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 ->assertNotNull ($ row );
137+ $ this ->assertNotFalse ($ row );
138138 $ this ->assertSame ('Derek Jones ' , $ row ->name );
139139 $ this ->seeNumRecords (4 , 'user ' , ['deleted_at ' => null ]);
140140 }
@@ -183,7 +183,7 @@ protected function doInsert(array $row): bool
183183 ['name ' => 'Race User ' , 'country ' => 'US ' ],
184184 );
185185
186- $ this ->assertNotNull ($ row );
186+ $ this ->assertNotFalse ($ 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,12 +218,12 @@ protected function doInsert(array $row): bool
218218 ['name ' => 'Race User ' , 'country ' => 'US ' ],
219219 );
220220
221- $ this ->assertNotNull ($ row );
221+ $ this ->assertNotFalse ($ row );
222222 $ this ->assertSame ('race@example.com ' , $ row ->email );
223223 $ this ->seeNumRecords (1 , 'user ' , ['email ' => 'race@example.com ' , 'deleted_at ' => null ]);
224224 }
225225
226- public function testReturnsNullOnNonUniqueErrorWithDebugDisabled (): void
226+ public function testReturnsFalseOnNonUniqueErrorWithDebugDisabled (): void
227227 {
228228 $ this ->disableDBDebug ();
229229
@@ -245,11 +245,11 @@ protected function doInsert(array $row): bool
245245 ['name ' => 'Error User ' , 'country ' => 'US ' ],
246246 );
247247
248- $ this ->assertNull ($ result );
248+ $ this ->assertFalse ($ result );
249249 $ this ->dontSeeInDatabase ('user ' , ['email ' => 'error@example.com ' ]);
250250 }
251251
252- public function testReturnsNullOnValidationFailure (): void
252+ public function testReturnsFalseOnValidationFailure (): void
253253 {
254254 // Subclass with strict validation rules that the test data fails.
255255 $ model = new class ($ this ->db ) extends UserModel {
@@ -264,7 +264,7 @@ public function testReturnsNullOnValidationFailure(): void
264264 ['name ' => 'Too Short ' ],
265265 );
266266
267- $ this ->assertNull ($ result );
267+ $ this ->assertFalse ($ result );
268268 $ this ->dontSeeInDatabase ('user ' , ['email ' => 'not-a-valid-email ' ]);
269269 $ this ->assertNotEmpty ($ model ->errors ());
270270 }
0 commit comments