From 4ca60e57d9efe16824ac1bd221b1155e459206be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Nowak?= Date: Tue, 22 Sep 2026 15:13:00 +0200 Subject: [PATCH] IBX-12654: Fixed dynamic calls to static methods --- .../SystemInfo/Collector/IbexaSystemInfoCollectorTest.php | 2 +- .../Collector/JsonComposerLockSystemInfoCollectorTest.php | 2 +- .../Collector/RepositorySystemInfoCollectorTest.php | 2 +- tests/bundle/SystemInfo/Registry/IdentifierBasedTest.php | 6 +++--- tests/bundle/View/SystemInfoViewBuilderTest.php | 2 +- tests/lib/EventListener/SystemInfoTabGroupListenerTest.php | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/bundle/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php b/tests/bundle/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php index eec8577..359940e 100644 --- a/tests/bundle/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php +++ b/tests/bundle/SystemInfo/Collector/IbexaSystemInfoCollectorTest.php @@ -22,7 +22,7 @@ final class IbexaSystemInfoCollectorTest extends TestCase public function setUp(): void { - $this->versionStabilityChecker = $this->createStub(VersionStabilityChecker::class); + $this->versionStabilityChecker = self::createStub(VersionStabilityChecker::class); } public function testCollect(): void diff --git a/tests/bundle/SystemInfo/Collector/JsonComposerLockSystemInfoCollectorTest.php b/tests/bundle/SystemInfo/Collector/JsonComposerLockSystemInfoCollectorTest.php index 425e2d2..63c0817 100644 --- a/tests/bundle/SystemInfo/Collector/JsonComposerLockSystemInfoCollectorTest.php +++ b/tests/bundle/SystemInfo/Collector/JsonComposerLockSystemInfoCollectorTest.php @@ -27,7 +27,7 @@ final class JsonComposerLockSystemInfoCollectorTest extends TestCase public function setUp(): void { - $this->versionStabilityChecker = $this->createStub(VersionStabilityChecker::class); + $this->versionStabilityChecker = self::createStub(VersionStabilityChecker::class); } public function testCollectWithMinimumStability(): void diff --git a/tests/bundle/SystemInfo/Collector/RepositorySystemInfoCollectorTest.php b/tests/bundle/SystemInfo/Collector/RepositorySystemInfoCollectorTest.php index c4d6b36..b9c5e8c 100644 --- a/tests/bundle/SystemInfo/Collector/RepositorySystemInfoCollectorTest.php +++ b/tests/bundle/SystemInfo/Collector/RepositorySystemInfoCollectorTest.php @@ -36,7 +36,7 @@ final class RepositorySystemInfoCollectorTest extends TestCase protected function setUp(): void { $this->dbalConnectionMock = $this->createMock(Connection::class); - $this->dbalPlatformMock = $this->createStub(AbstractMySQLPlatform::class); + $this->dbalPlatformMock = self::createStub(AbstractMySQLPlatform::class); $this->metricsProviderMock = $this->createMock(MetricsProvider::class); $this->metricsMock = $this->createMock(Metrics::class); diff --git a/tests/bundle/SystemInfo/Registry/IdentifierBasedTest.php b/tests/bundle/SystemInfo/Registry/IdentifierBasedTest.php index ffc97db..88e5114 100644 --- a/tests/bundle/SystemInfo/Registry/IdentifierBasedTest.php +++ b/tests/bundle/SystemInfo/Registry/IdentifierBasedTest.php @@ -26,8 +26,8 @@ final class IdentifierBasedTest extends TestCase protected function setUp(): void { $this->testItems = [ - 'foo' => $this->createStub(SystemInfoCollector::class), - 'bar' => $this->createStub(SystemInfoCollector::class), + 'foo' => self::createStub(SystemInfoCollector::class), + 'bar' => self::createStub(SystemInfoCollector::class), ]; $this->registry = new IdentifierBased(); @@ -63,7 +63,7 @@ public function testReplaceItem(): void $this->registry = new IdentifierBased($this->testItems); $replaceItems = [ - 'foo' => $this->createStub('Ibexa\\Bundle\\SystemInfo\\SystemInfo\\Collector\\SystemInfoCollector'), + 'foo' => self::createStub('Ibexa\\Bundle\\SystemInfo\\SystemInfo\\Collector\\SystemInfoCollector'), ]; $this->registry = new IdentifierBased($replaceItems); diff --git a/tests/bundle/View/SystemInfoViewBuilderTest.php b/tests/bundle/View/SystemInfoViewBuilderTest.php index 4c59396..2d86af1 100644 --- a/tests/bundle/View/SystemInfoViewBuilderTest.php +++ b/tests/bundle/View/SystemInfoViewBuilderTest.php @@ -53,7 +53,7 @@ public function testBuildView(): void $this->getRegistryMock() ); - $systemInfo = $this->createStub(SystemInfo::class); + $systemInfo = self::createStub(SystemInfo::class); $this->getRegistryMock() ->method('getItem') diff --git a/tests/lib/EventListener/SystemInfoTabGroupListenerTest.php b/tests/lib/EventListener/SystemInfoTabGroupListenerTest.php index 5c50199..ba7a6f3 100644 --- a/tests/lib/EventListener/SystemInfoTabGroupListenerTest.php +++ b/tests/lib/EventListener/SystemInfoTabGroupListenerTest.php @@ -58,8 +58,8 @@ public function testOnTabGroupPreRender(array $identifiers): void ->method('createTab') ->willReturnMap( [ - ['identifier_1', null, $this->createStub(SystemInfoTab::class)], - ['identifier_2', null, $this->createStub(SystemInfoTab::class)], + ['identifier_1', null, self::createStub(SystemInfoTab::class)], + ['identifier_2', null, self::createStub(SystemInfoTab::class)], ] ) ; @@ -82,7 +82,7 @@ public function testOnTabGroupPreRender(array $identifiers): void public function testSubscribedEvents(): void { - $systemInfoCollectorRegistry = $this->createStub(SystemInfoCollectorRegistry::class); + $systemInfoCollectorRegistry = self::createStub(SystemInfoCollectorRegistry::class); $systemInfoTabGroupListener = new SystemInfoTabGroupListener( $this->tabFactory, $systemInfoCollectorRegistry