Skip to content

Commit

Permalink
disable new tests for Symfony lowest
Browse files Browse the repository at this point in the history
  • Loading branch information
usu committed Dec 23, 2023
1 parent 828ecb6 commit 2428cac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Behat/HttpCacheContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
use ApiPlatform\Tests\Fixtures\TestBundle\HttpCache\TagCollectorCustom;
use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use Behat\Behat\Tester\Exception\PendingException;
use Behat\Mink\Driver\BrowserKitDriver;
use Behat\MinkExtension\Context\MinkContext;
use FriendsOfBehat\SymfonyExtension\Context\Environment\InitializedSymfonyExtensionEnvironment;
use PHPUnit\Framework\ExpectationFailedException;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\KernelInterface;

/**
Expand All @@ -38,6 +40,11 @@ public function __construct(private readonly KernelInterface $kernel, private Co
*/
public function registerCustomTagCollector(BeforeScenarioScope $scope): void
{
/* @phpstan-ignore-next-line */
if (version_compare(Kernel::VERSION, '6.4.0', '<')) {
throw new PendingException("Skipping this test: disabling reboot & overriding service doesn't work reliably for Symfony < 6.4.0");
}

$this->disableReboot($scope);
$this->driverContainer->set('api_platform.http_cache.tag_collector', new TagCollectorCustom());
}
Expand Down

0 comments on commit 2428cac

Please sign in to comment.