Skip to content

Commit

Permalink
fix: resolve rector issues
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml committed Dec 2, 2024
1 parent 45b0dd8 commit 96c08a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 3 additions & 4 deletions Tests/Unit/Controller/CreateAnnotationControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ final class CreateAnnotationControllerTest extends TestCase
private MatomoRepository&Stub $matomoRepositoryStub;
private CreateAnnotationController $subject;
private BackendUserAuthentication&Stub $backendUserStub;
private LanguageService&Stub $languageServiceStub;
private ServerRequestInterface&Stub $serverRequestStub;

protected function setUp(): void
Expand Down Expand Up @@ -73,11 +72,11 @@ protected function setUp(): void
$this->backendUserStub = $this->createStub(BackendUserAuthentication::class);
$GLOBALS['BE_USER'] = $this->backendUserStub;

$this->languageServiceStub = $this->createStub(LanguageService::class);
$this->languageServiceStub
$languageServiceStub = $this->createStub(LanguageService::class);
$languageServiceStub
->method('sL')
->willReturnCallback(static fn(string $key): string => $key);
$GLOBALS['LANG'] = $this->languageServiceStub;
$GLOBALS['LANG'] = $languageServiceStub;

$this->serverRequestStub = $this->createStub(ServerRequestInterface::class);
}
Expand Down
6 changes: 2 additions & 4 deletions Tests/Unit/Domain/Repository/MatomoRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;
use Psr\EventDispatcher\EventDispatcherInterface;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\EventDispatcher\NoopEventDispatcher;

Expand All @@ -30,21 +29,20 @@ final class MatomoRepositoryTest extends TestCase
{
private MatomoConnector&MockObject $connectorMock;
private FrontendInterface&Stub $cacheStub;
private EventDispatcherInterface $eventDispatcher;
private ConnectionConfiguration $connectionConfiguration;
private MatomoRepository $subject;

protected function setUp(): void
{
$this->connectorMock = $this->createMock(MatomoConnector::class);
$this->cacheStub = $this->createStub(FrontendInterface::class);
$this->eventDispatcher = new NoopEventDispatcher();
$eventDispatcher = new NoopEventDispatcher();

$this->subject = new MatomoRepository(
$this->cacheStub,
new CacheIdentifierCreator(),
$this->connectorMock,
$this->eventDispatcher,
$eventDispatcher,
);

$this->connectionConfiguration = new ConnectionConfiguration('https://example.net', 3, '');
Expand Down

0 comments on commit 96c08a2

Please sign in to comment.