@@ -16,7 +16,7 @@ public function setUp()
1616 $ user = new User ();
1717 $ user ->addGroup (new Group ('Test ' ));
1818 $ this ->dm ->persist ($ user );
19- $ this ->dm ->flush ();
19+ $ this ->dm ->flush (null , [ ' w ' => ' majority ' ] );
2020 $ this ->dm ->clear ();
2121 }
2222
@@ -31,6 +31,7 @@ public function testHintIsNotSetByDefault()
3131 $ this ->assertArrayNotHasKey (Query::HINT_READ_PREFERENCE_TAGS , $ cursor ->getHints ());
3232
3333 $ user = $ cursor ->getSingleResult ();
34+ $ this ->assertInstanceOf (User::class, $ user );
3435
3536 $ this ->assertInstanceOf ('Doctrine\ODM\MongoDB\PersistentCollection ' , $ user ->getGroups ());
3637 $ this ->assertArrayNotHasKey (Query::HINT_READ_PREFERENCE , $ user ->getGroups ()->getHints ());
@@ -53,6 +54,7 @@ public function testHintIsSetOnQuery($readPreference, array $tags = null)
5354 $ this ->assertReadPreferenceTagsHint ($ tags , $ cursor ->getHints ());
5455
5556 $ user = $ cursor ->getSingleResult ();
57+ $ this ->assertInstanceOf (User::class, $ user );
5658
5759 $ this ->assertInstanceOf ('Doctrine\ODM\MongoDB\PersistentCollection ' , $ user ->getGroups ());
5860 $ this ->assertReadPreferenceHint ($ readPreference , $ user ->getGroups ()->getHints ());
@@ -79,6 +81,7 @@ public function testHintIsSetOnCursor($readPreference, array $tags = null)
7981 $ this ->assertReadPreferenceTagsHint ($ tags , $ cursor ->getHints ());
8082
8183 $ user = $ cursor ->getSingleResult ();
84+ $ this ->assertInstanceOf (User::class, $ user );
8285
8386 $ this ->assertInstanceOf ('Doctrine\ODM\MongoDB\PersistentCollection ' , $ user ->getGroups ());
8487 $ this ->assertReadPreferenceHint ($ readPreference , $ user ->getGroups ()->getHints ());
@@ -100,8 +103,9 @@ public function testHintIsSetOnPersistentCollection($readPreference, array $tags
100103 $ this ->assertArrayNotHasKey (Query::HINT_READ_PREFERENCE_TAGS , $ cursor ->getHints ());
101104
102105 $ user = $ cursor ->getSingleResult ();
103- $ groups = $ user -> getGroups ( );
106+ $ this -> assertInstanceOf (User::class, $ user );
104107
108+ $ groups = $ user ->getGroups ();
105109 $ this ->assertInstanceOf ('Doctrine\ODM\MongoDB\PersistentCollection ' , $ groups );
106110
107111 $ groups ->setHints (array (
0 commit comments