From 1e68e0cc8fb254c0b334b69225829189726a8568 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 17 Oct 2024 16:07:03 +0200 Subject: [PATCH] [Tests] Renamed CustomMatcher to TestMatcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Paweł Niedzielski --- .../EventListener/SiteAccessMatchListenerTest.php | 10 +++++----- .../{CustomMatcher.php => TestMatcher.php} | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) rename tests/lib/MVC/Symfony/EventListener/{CustomMatcher.php => TestMatcher.php} (90%) diff --git a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php index 67f1c8771e..0c37ea49ca 100644 --- a/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/SiteAccessMatchListenerTest.php @@ -158,21 +158,21 @@ public function testOnKernelRequestSerializedSAWithCompoundMatcher(): void */ public function testOnKernelRequestSerializedSAWithMatcherInMatcherRegistry(): void { - $matcher = new CustomMatcher([]); + $matcher = new TestMatcher([]); - $matcher2 = new CustomMatcher([]); + $matcher2 = new TestMatcher([]); $matcher2->setMapKey('key_foobar'); $this->registry ->expects(self::once()) ->method('hasMatcher') - ->with(CustomMatcher::class) + ->with(TestMatcher::class) ->willReturn(true); $this->registry ->expects(self::once()) ->method('getMatcher') - ->with(CustomMatcher::class) + ->with(TestMatcher::class) ->willReturn($matcher); $siteAccess = $this->createSiteAccess( @@ -182,7 +182,7 @@ public function testOnKernelRequestSerializedSAWithMatcherInMatcherRegistry(): v ); $request = $this->createAndDispatchRequest($siteAccess); - /** @var \Ibexa\Tests\Core\MVC\Symfony\EventListener\CustomMatcher $siteAccessMatcher */ + /** @var \Ibexa\Tests\Core\MVC\Symfony\EventListener\TestMatcher $siteAccessMatcher */ $siteAccessMatcher = $siteAccess->matcher; self::assertEquals('key_foobar', $siteAccessMatcher->getMapKey()); self::assertFalse($request->attributes->has('serialized_siteaccess')); diff --git a/tests/lib/MVC/Symfony/EventListener/CustomMatcher.php b/tests/lib/MVC/Symfony/EventListener/TestMatcher.php similarity index 90% rename from tests/lib/MVC/Symfony/EventListener/CustomMatcher.php rename to tests/lib/MVC/Symfony/EventListener/TestMatcher.php index 192e4d1a15..cf8ea8bcc9 100644 --- a/tests/lib/MVC/Symfony/EventListener/CustomMatcher.php +++ b/tests/lib/MVC/Symfony/EventListener/TestMatcher.php @@ -11,7 +11,7 @@ use Ibexa\Bundle\Core\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map\URI; -class CustomMatcher extends URI implements Matcher +class TestMatcher extends URI implements Matcher { public function setMatchingConfiguration($matchingConfiguration): void {