Skip to content

Commit

Permalink
[Tests] Renamed CustomMatcher to TestMatcher
Browse files Browse the repository at this point in the history
Co-Authored-By: Paweł Niedzielski <[email protected]>
  • Loading branch information
alongosz and Steveb-p committed Oct 17, 2024
1 parent 1270e47 commit 1e68e0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 1e68e0c

Please sign in to comment.