From cbdaa07f73c56516e520e7ad4d14cfe33eb84f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Tue, 7 May 2024 12:48:23 +0200 Subject: [PATCH] IBX-8121: Fixed code style for 5.0 https://github.com/ibexa/notifications/pull/10 --- composer.json | 2 +- tests/lib/Mapper/NotificationMapperTest.php | 2 +- tests/lib/Mapper/RecipientMapperTest.php | 2 +- .../ChainSubscriptionResolverTest.php | 2 +- .../ConfigBasedSubscriptionResolverTest.php | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index e338b63..26d8247 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "symfony/yaml": "^5.4" }, "require-dev": { - "ibexa/code-style": "^1.1", + "ibexa/code-style": "~2.0.0", "ibexa/doctrine-schema": "~5.0.x-dev", "phpstan/phpstan": "^1.10", "phpstan/phpstan-phpunit": "^1.3", diff --git a/tests/lib/Mapper/NotificationMapperTest.php b/tests/lib/Mapper/NotificationMapperTest.php index f2d29ff..23b1e09 100644 --- a/tests/lib/Mapper/NotificationMapperTest.php +++ b/tests/lib/Mapper/NotificationMapperTest.php @@ -32,7 +32,7 @@ public function testMapToSymfonyNotification(): void new SymfonyNotificationAdapter($notification) ); - $this->assertSame($notification, $symfonyNotification); + self::assertSame($notification, $symfonyNotification); } public function testMapToSymfonyNotificationThrowsExceptionOnInvalidNotification(): void diff --git a/tests/lib/Mapper/RecipientMapperTest.php b/tests/lib/Mapper/RecipientMapperTest.php index ac85159..d3ad922 100644 --- a/tests/lib/Mapper/RecipientMapperTest.php +++ b/tests/lib/Mapper/RecipientMapperTest.php @@ -32,7 +32,7 @@ public function testMapToSymfonyRecipient(): void new SymfonyRecipientAdapter($recipient) ); - $this->assertSame($recipient, $symfonyRecipient); + self::assertSame($recipient, $symfonyRecipient); } public function testMapToSymfonyRecipientThrowsExceptionOnInvalidRecipient(): void diff --git a/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php b/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php index 614cd90..bd23428 100644 --- a/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php +++ b/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php @@ -28,7 +28,7 @@ public function testResolve(array $resolvers, array $expectedChannels): void $notification = $this->createMock(NotificationInterface::class); $channels = $subscriptionResolver->resolve($notification); - $this->assertSame($expectedChannels, iterator_to_array($channels)); + self::assertSame($expectedChannels, iterator_to_array($channels)); } /** diff --git a/tests/lib/SubscriptionResolver/ConfigBasedSubscriptionResolverTest.php b/tests/lib/SubscriptionResolver/ConfigBasedSubscriptionResolverTest.php index e5fdc30..ca87e26 100644 --- a/tests/lib/SubscriptionResolver/ConfigBasedSubscriptionResolverTest.php +++ b/tests/lib/SubscriptionResolver/ConfigBasedSubscriptionResolverTest.php @@ -54,13 +54,13 @@ public function testResolve( $subscriptions = $this->resolver->resolve($notification); $subscriptionsArray = iterator_to_array($subscriptions); - $this->assertCount(count($expectedChannels), $subscriptionsArray); - $this->assertContainsOnlyInstancesOf(ChannelSubscription::class, $subscriptionsArray); + self::assertCount(count($expectedChannels), $subscriptionsArray); + self::assertContainsOnlyInstancesOf(ChannelSubscription::class, $subscriptionsArray); $i = 0; foreach ($subscriptionsArray as $channelSubscription) { - $this->assertSame($notificationType, $channelSubscription->getNotificationType()); - $this->assertSame($expectedChannels[$i++], $channelSubscription->getChannel()); + self::assertSame($notificationType, $channelSubscription->getNotificationType()); + self::assertSame($expectedChannels[$i++], $channelSubscription->getChannel()); } }