File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Tests/Session/Storage/Handler Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \HttpFoundation \Tests \Session \Storage \Handler ;
1313
14+ use MongoDB \Client ;
1415use PHPUnit \Framework \MockObject \MockObject ;
1516use PHPUnit \Framework \TestCase ;
1617use Symfony \Component \HttpFoundation \Session \Storage \Handler \MongoDbSessionHandler ;
2324class MongoDbSessionHandlerTest extends TestCase
2425{
2526 /**
26- * @var MockObject
27+ * @var MockObject&Client
2728 */
2829 private $ mongo ;
2930 private $ storage ;
@@ -33,11 +34,11 @@ protected function setUp(): void
3334 {
3435 parent ::setUp ();
3536
36- if (!class_exists (\ MongoDB \ Client::class)) {
37+ if (!class_exists (Client::class)) {
3738 $ this ->markTestSkipped ('The mongodb/mongodb package is required. ' );
3839 }
3940
40- $ this ->mongo = $ this ->getMockBuilder (\ MongoDB \ Client::class)
41+ $ this ->mongo = $ this ->getMockBuilder (Client::class)
4142 ->disableOriginalConstructor ()
4243 ->getMock ();
4344
@@ -199,7 +200,7 @@ public function testGetConnection()
199200 $ method = new \ReflectionMethod ($ this ->storage , 'getMongo ' );
200201 $ method ->setAccessible (true );
201202
202- $ this ->assertInstanceOf (\ MongoDB \ Client::class, $ method ->invoke ($ this ->storage ));
203+ $ this ->assertInstanceOf (Client::class, $ method ->invoke ($ this ->storage ));
203204 }
204205
205206 private function createMongoCollectionMock (): \MongoDB \Collection
You can’t perform that action at this time.
0 commit comments