@@ -37,7 +37,7 @@ public function testEmbedsManySave()
37
37
$ this ->assertInstanceOf ('DateTime ' , $ address ->created_at );
38
38
$ this ->assertInstanceOf ('DateTime ' , $ address ->updated_at );
39
39
$ this ->assertNotNull ($ address ->_id );
40
- $ this ->assertInternalType ( ' string ' , $ address ->_id );
40
+ $ this ->assertIsString ( $ address ->_id );
41
41
42
42
$ raw = $ address ->getAttributes ();
43
43
$ this ->assertInstanceOf (\MongoDB \BSON \ObjectID::class, $ raw ['_id ' ]);
@@ -177,7 +177,7 @@ public function testEmbedsManyCreate()
177
177
$ user = User::create ([]);
178
178
$ address = $ user ->addresses ()->create (['city ' => 'Bruxelles ' ]);
179
179
$ this ->assertInstanceOf ('Address ' , $ address );
180
- $ this ->assertInternalType ( ' string ' , $ address ->_id );
180
+ $ this ->assertIsString ( $ address ->_id );
181
181
$ this ->assertEquals (['Bruxelles ' ], $ user ->addresses ->pluck ('city ' )->all ());
182
182
183
183
$ raw = $ address ->getAttributes ();
@@ -188,7 +188,7 @@ public function testEmbedsManyCreate()
188
188
189
189
$ user = User::create ([]);
190
190
$ address = $ user ->addresses ()->create (['_id ' => '' , 'city ' => 'Bruxelles ' ]);
191
- $ this ->assertInternalType ( ' string ' , $ address ->_id );
191
+ $ this ->assertIsString ( $ address ->_id );
192
192
193
193
$ raw = $ address ->getAttributes ();
194
194
$ this ->assertInstanceOf (\MongoDB \BSON \ObjectID::class, $ raw ['_id ' ]);
@@ -388,14 +388,14 @@ public function testEmbedsManyEagerLoading()
388
388
$ relations = $ user ->getRelations ();
389
389
$ this ->assertArrayNotHasKey ('addresses ' , $ relations );
390
390
$ this ->assertArrayHasKey ('addresses ' , $ user ->toArray ());
391
- $ this ->assertInternalType ( ' array ' , $ user ->toArray ()['addresses ' ]);
391
+ $ this ->assertIsArray ( $ user ->toArray ()['addresses ' ]);
392
392
393
393
$ user = User::with ('addresses ' )->get ()->first ();
394
394
$ relations = $ user ->getRelations ();
395
395
$ this ->assertArrayHasKey ('addresses ' , $ relations );
396
396
$ this ->assertEquals (2 , $ relations ['addresses ' ]->count ());
397
397
$ this ->assertArrayHasKey ('addresses ' , $ user ->toArray ());
398
- $ this ->assertInternalType ( ' array ' , $ user ->toArray ()['addresses ' ]);
398
+ $ this ->assertIsArray ( $ user ->toArray ()['addresses ' ]);
399
399
}
400
400
401
401
public function testEmbedsManyDeleteAll ()
@@ -467,7 +467,7 @@ public function testEmbedsOne()
467
467
$ this ->assertInstanceOf ('DateTime ' , $ father ->created_at );
468
468
$ this ->assertInstanceOf ('DateTime ' , $ father ->updated_at );
469
469
$ this ->assertNotNull ($ father ->_id );
470
- $ this ->assertInternalType ( ' string ' , $ father ->_id );
470
+ $ this ->assertIsString ( $ father ->_id );
471
471
472
472
$ raw = $ father ->getAttributes ();
473
473
$ this ->assertInstanceOf ('MongoDB\BSON\ObjectID ' , $ raw ['_id ' ]);
@@ -543,7 +543,7 @@ public function testEmbedsManyToArray()
543
543
544
544
$ array = $ user ->toArray ();
545
545
$ this ->assertArrayHasKey ('addresses ' , $ array );
546
- $ this ->assertInternalType ( ' array ' , $ array ['addresses ' ]);
546
+ $ this ->assertIsArray ( $ array ['addresses ' ]);
547
547
}
548
548
549
549
public function testEmbeddedSave ()
0 commit comments