Skip to content

Commit

Permalink
Merge pull request #1947 from stloyd/enable-63
Browse files Browse the repository at this point in the history
Enable integration tests on Symfony 6
  • Loading branch information
stloyd authored Aug 26, 2023
2 parents dd0e7f2 + 6259f87 commit 4cd1b8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
},

"conflict": {
"symfony/security-bundle": ">=6.0,<6.3.4",
"twig/twig": "<1.43|>=2.0,<2.13"
},

Expand Down
14 changes: 4 additions & 10 deletions tests/Functional/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Security\Http\SecurityEvents;

final class IntegrationTest extends WebTestCase
Expand All @@ -31,7 +30,7 @@ public static function getKernelClass(): string

public function testRequestRedirect(): void
{
$client = static::createClient();
$client = self::createClient();
$client->disableReboot();
$client->getContainer()->set('hwi_oauth.http_client', new MockHttpClient());
$client->request('GET', '/private');
Expand Down Expand Up @@ -66,7 +65,7 @@ public function testRequestRedirect(): void

public function testRequestRedirectApi(): void
{
$client = static::createClient();
$client = self::createClient();
$client->disableReboot();
$client->getContainer()->set('hwi_oauth.http_client', new MockHttpClient());
$client->request('GET', '/private');
Expand Down Expand Up @@ -121,7 +120,7 @@ function ($method, $url, $options) {
}
);

$client = static::createClient();
$client = self::createClient();
$client->disableReboot();
$container = $client->getContainer();
$container->set('hwi_oauth.http_client', $httpClient);
Expand Down Expand Up @@ -149,11 +148,6 @@ function ($method, $url, $options) {

public function testRequestCheckApi(): void
{
// @phpstan-ignore-next-line
if (Kernel::MAJOR_VERSION >= 6) {
$this->markTestSkipped('Skipped due to bug in Symfony Security component: https://github.com/symfony/symfony/issues/51319');
}

$redirectLoginFromService = 'http://localhost/api/check-login/google?'
.http_build_query([
'code' => 'sOmeRand0m-code',
Expand All @@ -174,7 +168,7 @@ function ($method, $url, $options) {
}
);

$client = static::createClient();
$client = self::createClient();
$client->disableReboot();
$container = $client->getContainer();
$container->set('hwi_oauth.http_client', $httpClient);
Expand Down

0 comments on commit 4cd1b8e

Please sign in to comment.