File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \Lock \Tests \Store ;
1313
14+ use MongoDB \Collection ;
15+ use MongoDB \Client ;
16+ use PHPUnit \Framework \SkippedTestSuiteError ;
1417use PHPUnit \Framework \TestCase ;
1518use Symfony \Component \Lock \Store \MongoDbStore ;
1619use Symfony \Component \Lock \Store \StoreFactory ;
1720
1821/**
1922 * @author Alexandre Daubois <alex.daubois@gmail.com>
2023 *
21- * @requires extension mongo
24+ * @requires extension mongodb
2225 */
2326class MongoDbStoreFactoryTest extends TestCase
2427{
28+ public static function setupBeforeClass (): void
29+ {
30+ if (!class_exists (Client::class)) {
31+ throw new SkippedTestSuiteError ('The mongodb/mongodb package is required. ' );
32+ }
33+ }
34+
2535 public function testCreateMongoDbCollectionStore ()
2636 {
27- $ store = StoreFactory::createStore ($ this ->createMock (\ MongoDB \ Collection::class));
37+ $ store = StoreFactory::createStore ($ this ->createMock (Collection::class));
2838
2939 $ this ->assertInstanceOf (MongoDbStore::class, $ store );
3040 }
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class MongoDbStoreTest extends AbstractStoreTestCase
3232
3333 public static function setupBeforeClass (): void
3434 {
35- if (!class_exists (\ MongoDB \ Client::class)) {
35+ if (!class_exists (Client::class)) {
3636 throw new SkippedTestSuiteError ('The mongodb/mongodb package is required. ' );
3737 }
3838
You can’t perform that action at this time.
0 commit comments