From b00eb517b1863bf013ac19512dbcc6102463953e Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Mon, 7 Mar 2022 17:07:50 +0100 Subject: [PATCH] [PHPUnit] Move subscribers tests to main directory --- .../AdminSectionCacheControlSubscriberTest.php | 14 +------------- ...AccountSubSectionCacheControlSubscriberTest.php | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) rename {src/Sylius/Bundle/AdminBundle/Tests => tests}/EventListener/AdminSectionCacheControlSubscriberTest.php (66%) rename {src/Sylius/Bundle/ShopBundle/Tests => tests}/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php (67%) diff --git a/src/Sylius/Bundle/AdminBundle/Tests/EventListener/AdminSectionCacheControlSubscriberTest.php b/tests/EventListener/AdminSectionCacheControlSubscriberTest.php similarity index 66% rename from src/Sylius/Bundle/AdminBundle/Tests/EventListener/AdminSectionCacheControlSubscriberTest.php rename to tests/EventListener/AdminSectionCacheControlSubscriberTest.php index 41feff738b5..ae9bd10c944 100644 --- a/src/Sylius/Bundle/AdminBundle/Tests/EventListener/AdminSectionCacheControlSubscriberTest.php +++ b/tests/EventListener/AdminSectionCacheControlSubscriberTest.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\Bundle\AdminBundle\Tests\EventListener; +namespace Sylius\Tests\EventListener; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -28,16 +28,4 @@ public function it_returns_proper_cache_headers_for_admin_endpoints(): void $this->assertResponseHeaderSame('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store, private'); } - - /** - * @test - */ - public function it_returns_standard_headers_otherwise(): void - { - $client = static::createClient(); - - $client->request('GET', '/en_US/'); - - $this->assertResponseHeaderSame('Cache-Control', 'max-age=0, must-revalidate, private'); - } } diff --git a/src/Sylius/Bundle/ShopBundle/Tests/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php b/tests/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php similarity index 67% rename from src/Sylius/Bundle/ShopBundle/Tests/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php rename to tests/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php index 0dce7db7fad..c3ad2f1da82 100644 --- a/src/Sylius/Bundle/ShopBundle/Tests/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php +++ b/tests/EventListener/ShopCustomerAccountSubSectionCacheControlSubscriberTest.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\Bundle\ShopBundle\Tests\EventListener; +namespace Sylius\Tests\EventListener; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -28,16 +28,4 @@ public function it_returns_proper_cache_headers_for_customer_account_endpoints() $this->assertResponseHeaderSame('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store, private'); } - - /** - * @test - */ - public function it_returns_standard_headers_otherwise(): void - { - $client = static::createClient(); - - $client->request('GET', '/en_US/'); - - $this->assertResponseHeaderSame('Cache-Control', 'max-age=0, must-revalidate, private'); - } }