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 11
11
12
12
namespace Symfony \Component \HttpFoundation \Tests \Session \Storage \Handler ;
13
13
14
+ use MongoDB \Client ;
14
15
use PHPUnit \Framework \MockObject \MockObject ;
15
16
use PHPUnit \Framework \TestCase ;
16
17
use Symfony \Component \HttpFoundation \Session \Storage \Handler \MongoDbSessionHandler ;
23
24
class MongoDbSessionHandlerTest extends TestCase
24
25
{
25
26
/**
26
- * @var MockObject
27
+ * @var MockObject&Client
27
28
*/
28
29
private $ mongo ;
29
30
private $ storage ;
@@ -33,11 +34,11 @@ protected function setUp(): void
33
34
{
34
35
parent ::setUp ();
35
36
36
- if (!class_exists (\ MongoDB \ Client::class)) {
37
+ if (!class_exists (Client::class)) {
37
38
$ this ->markTestSkipped ('The mongodb/mongodb package is required. ' );
38
39
}
39
40
40
- $ this ->mongo = $ this ->getMockBuilder (\ MongoDB \ Client::class)
41
+ $ this ->mongo = $ this ->getMockBuilder (Client::class)
41
42
->disableOriginalConstructor ()
42
43
->getMock ();
43
44
@@ -199,7 +200,7 @@ public function testGetConnection()
199
200
$ method = new \ReflectionMethod ($ this ->storage , 'getMongo ' );
200
201
$ method ->setAccessible (true );
201
202
202
- $ this ->assertInstanceOf (\ MongoDB \ Client::class, $ method ->invoke ($ this ->storage ));
203
+ $ this ->assertInstanceOf (Client::class, $ method ->invoke ($ this ->storage ));
203
204
}
204
205
205
206
private function createMongoCollectionMock (): \MongoDB \Collection
You can’t perform that action at this time.
0 commit comments