@@ -42,7 +42,10 @@ private function entityManager(): UserManagerInterface
4242 $ manager ->method ('getId ' )
4343 ->willReturn ('increment ' );
4444 $ manager ->method ('get ' )
45- ->with (UserEntity::class, self ::isType ('string ' ))
45+ ->with (
46+ UserEntity::class,
47+ \method_exists (self ::class, 'isString ' ) ? self ::isString () : self ::isType ('string ' ),
48+ )
4649 ->willReturn (new UserEntity ());
4750
4851 return $ manager ;
@@ -66,13 +69,16 @@ private function documentManager(): UserManagerInterface
6669 $ manager ->method ('getId ' )
6770 ->willReturn ('uuid ' );
6871 $ manager ->method ('get ' )
69- ->with (UserDocument::class, self ::isType ('string ' ))
72+ ->with (
73+ UserDocument::class,
74+ \method_exists (self ::class, 'isString ' ) ? self ::isString () : self ::isType ('string ' ),
75+ )
7076 ->willReturn (new UserDocument ());
7177
7278 return $ manager ;
7379 }
7480
75- public function testIt_supports_same_classes_as_managers (): void
81+ public function test_it_supports_same_classes_as_managers (): void
7682 {
7783 $ entityManager = $ this ->entityManager ();
7884 $ documentManager = $ this ->documentManager ();
@@ -97,7 +103,7 @@ public function testIt_supports_same_classes_as_managers(): void
97103 self ::assertFalse ($ userEmptyManager ->supportsClass ($ document ));
98104 }
99105
100- public function testIt_supports_same_users_as_managers (): void
106+ public function test_it_supports_same_users_as_managers (): void
101107 {
102108 $ entityManager = $ this ->entityManager ();
103109 $ documentManager = $ this ->documentManager ();
@@ -122,7 +128,7 @@ public function testIt_supports_same_users_as_managers(): void
122128 self ::assertFalse ($ userEmptyManager ->supportsUser ($ document ));
123129 }
124130
125- public function testIt_get_user_class_from_appropriate_manager (): void
131+ public function test_it_get_user_class_from_appropriate_manager (): void
126132 {
127133 $ entity = new UserEntity ();
128134 $ document = new UserDocument ();
@@ -132,7 +138,7 @@ public function testIt_get_user_class_from_appropriate_manager(): void
132138 self ::assertSame (UserDocument::class, $ userCompleteManager ->getClass ($ document ));
133139 }
134140
135- public function testIt_get_user_id_from_appropriate_manager ()
141+ public function test_it_get_user_id_from_appropriate_manager ()
136142 {
137143 $ entity = new UserEntity ();
138144 $ document = new UserDocument ();
@@ -142,7 +148,7 @@ public function testIt_get_user_id_from_appropriate_manager()
142148 self ::assertSame ('uuid ' , $ userCompleteManager ->getId ($ document ));
143149 }
144150
145- public function testIt_get_user_from_appropriate_manager (): void
151+ public function test_it_get_user_from_appropriate_manager (): void
146152 {
147153 $ userCompleteManager = $ this ->manager ([$ this ->entityManager (), $ this ->documentManager ()]);
148154 self ::assertInstanceOf (UserEntity::class, $ userCompleteManager ->get (UserEntity::class, '9999 ' ));
@@ -152,23 +158,23 @@ public function testIt_get_user_from_appropriate_manager(): void
152158 );
153159 }
154160
155- public function testIt_throw_exception_on_get_user_class_without_appropriate_manager (): void
161+ public function test_it_throw_exception_on_get_user_class_without_appropriate_manager (): void
156162 {
157163 $ this ->expectException (InvalidArgumentException::class);
158164
159165 $ userCompleteManager = $ this ->manager ([$ this ->entityManager (), $ this ->documentManager ()]);
160166 $ userCompleteManager ->getClass (new \stdClass ());
161167 }
162168
163- public function testIt_throw_exception_on_get_user_id_without_appropriate_manager (): void
169+ public function test_it_throw_exception_on_get_user_id_without_appropriate_manager (): void
164170 {
165171 $ this ->expectException (InvalidArgumentException::class);
166172
167173 $ userCompleteManager = $ this ->manager ([$ this ->entityManager (), $ this ->documentManager ()]);
168174 $ userCompleteManager ->getId (new \stdClass ());
169175 }
170176
171- public function testIt_throw_exception_on_get_user_without_appropriate_manager (): void
177+ public function test_it_throw_exception_on_get_user_without_appropriate_manager (): void
172178 {
173179 $ this ->expectException (InvalidArgumentException::class);
174180
0 commit comments