Skip to content

Commit fc05855

Browse files
Merge branch '6.4' into 7.0
* 6.4: [Process] remove fixing of legacy bug, when PTS functionality is enabled DX: re-apply self_accessor and phpdoc_types_order by PHP CS Fixer [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response fix test Fix wrong yaml parse null test [AssetMapper] Fixing merge from multiple PR's Bump Symfony version to 5.4.31 Update VERSION for 5.4.30 Update CONTRIBUTORS for 5.4.30 Update CHANGELOG for 5.4.30 Fix wrong merge [AssetMapper] Allowing circular references in JavaScriptImportPathCompiler [AssetMapper] Fix file deleting errors & remove nullable MappedAsset on JS import [Lock] Fix mongodb extension requirement in tests [Yaml] Remove dead code [AssetMapper] Fix in-file imports to resolve via filesystem throw better exception in TranslatableNormalizer, add to changelog Passing null to Inline::parse is not allowed Fix passing null to trim()
2 parents 528187e + 3c30a5b commit fc05855

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Tests/Store/MongoDbStoreFactoryTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,30 @@
1111

1212
namespace Symfony\Component\Lock\Tests\Store;
1313

14+
use MongoDB\Collection;
15+
use MongoDB\Client;
16+
use PHPUnit\Framework\SkippedTestSuiteError;
1417
use PHPUnit\Framework\TestCase;
1518
use Symfony\Component\Lock\Store\MongoDbStore;
1619
use Symfony\Component\Lock\Store\StoreFactory;
1720

1821
/**
1922
* @author Alexandre Daubois <[email protected]>
2023
*
21-
* @requires extension mongo
24+
* @requires extension mongodb
2225
*/
2326
class 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
}

Tests/Store/MongoDbStoreTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class MongoDbStoreTest extends AbstractStoreTestCase
3131

3232
public static function setupBeforeClass(): void
3333
{
34-
if (!class_exists(\MongoDB\Client::class)) {
35-
self::markTestSkipped('The mongodb/mongodb package is required.');
34+
if (!class_exists(Client::class)) {
35+
throw new SkippedTestSuiteError('The mongodb/mongodb package is required.');
3636
}
3737

3838
$client = self::getMongoClient();

0 commit comments

Comments
 (0)