diff --git a/tests/unit/Storefront/Framework/Routing/StorefrontSubscriberTest.php b/tests/unit/Storefront/Framework/Routing/StorefrontSubscriberTest.php index f169cdd39ec..8383d55c4d7 100644 --- a/tests/unit/Storefront/Framework/Routing/StorefrontSubscriberTest.php +++ b/tests/unit/Storefront/Framework/Routing/StorefrontSubscriberTest.php @@ -4,7 +4,6 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; -use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; use PHPUnit\Framework\TestCase; use Shopware\Core\Checkout\Cart\Exception\CustomerNotLoggedInException; use Shopware\Core\Checkout\Customer\Event\CustomerLoginEvent; @@ -258,44 +257,6 @@ public static function dataProviderXMLHttpRequest(): \Generator ]; } - #[DoesNotPerformAssertions] - #[DataProvider('dataProviderStartSession')] - public function testStartSessionNoRequest(?Request $request): void - { - $requestStack = new RequestStack(); - - if ($request) { - $requestStack->push($request); - } - - $subscriber = new StorefrontSubscriber( - $requestStack, - $this->createMock(RouterInterface::class), - $this->createMock(MaintenanceModeResolver::class), - new StaticSystemConfigService(), - ); - - $subscriber->startSession(); - } - - public static function dataProviderStartSession(): \Generator - { - yield 'no request' => [ - 'request' => null, - 'expected' => false, - ]; - - yield 'generic request' => [ - 'request' => new Request(), - 'expected' => false, - ]; - - yield 'storefront request without session' => [ - 'request' => new Request([], [], [PlatformRequest::ATTRIBUTE_ROUTE_SCOPE => [StorefrontRouteScope::ID]]), - 'expected' => false, - ]; - } - public function testStartSession(): void { $request = new Request([], [], [SalesChannelRequest::ATTRIBUTE_IS_SALES_CHANNEL_REQUEST => true, PlatformRequest::ATTRIBUTE_SALES_CHANNEL_CONTEXT_OBJECT => Generator::createSalesChannelContext()], [], [], ['HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest']);