Skip to content

Commit

Permalink
Merge branch '6.3' into 6.4
Browse files Browse the repository at this point in the history
* 6.3:
  [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response
  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
  [Lock] Fix mongodb extension requirement in tests
  • Loading branch information
nicolas-grekas committed Oct 29, 2023
2 parents 1b56e82 + 59d1837 commit b6e3df2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use MongoDB\Client;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\SkippedTestSuiteError;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler;

Expand All @@ -29,13 +30,16 @@ class MongoDbSessionHandlerTest extends TestCase
private MockObject&Client $mongo;
private MongoDbSessionHandler $storage;

protected function setUp(): void
public static function setUpBeforeClass(): void
{
parent::setUp();

if (!class_exists(Client::class)) {
$this->markTestSkipped('The mongodb/mongodb package is required.');
throw new SkippedTestSuiteError('The mongodb/mongodb package is required.');
}
}

protected function setUp(): void
{
parent::setUp();

$this->mongo = $this->getMockBuilder(Client::class)
->disableOriginalConstructor()
Expand Down

0 comments on commit b6e3df2

Please sign in to comment.