From e24af62a59fb3156d47982dcdfdf1410272e65ec Mon Sep 17 00:00:00 2001 From: fs Date: Sun, 22 Mar 2026 14:14:39 +0100 Subject: [PATCH] fix: eliminate PHPUnit warnings and deprecations in test suite Set defaultTestSuite="CoreCore" to prevent 222 duplicate file warnings, and replace deprecated isType() with isArray()/isString() in notification listener tests. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../UserActivatedNotificationListenerTest.php | 2 +- .../UserAssignmentChangedNotificationListenerTest.php | 10 +++++----- .../UserDeactivatedNotificationListenerTest.php | 2 +- phpunit.xml | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/notifications/tests/Module/Notifications/Listeners/UserActivatedNotificationListenerTest.php b/modules/notifications/tests/Module/Notifications/Listeners/UserActivatedNotificationListenerTest.php index 4fe0353..0673d4b 100644 --- a/modules/notifications/tests/Module/Notifications/Listeners/UserActivatedNotificationListenerTest.php +++ b/modules/notifications/tests/Module/Notifications/Listeners/UserActivatedNotificationListenerTest.php @@ -51,7 +51,7 @@ final class UserActivatedNotificationListenerTest extends TestCase 'admin/users/edit/user-uuid', ['user_id' => 10, 'uuid' => 'user-uuid'], 5, - $this->isType('array') + $this->isArray() ); $this->listener->handle('user.activated', [ diff --git a/modules/notifications/tests/Module/Notifications/Listeners/UserAssignmentChangedNotificationListenerTest.php b/modules/notifications/tests/Module/Notifications/Listeners/UserAssignmentChangedNotificationListenerTest.php index d28fab0..d414fb4 100644 --- a/modules/notifications/tests/Module/Notifications/Listeners/UserAssignmentChangedNotificationListenerTest.php +++ b/modules/notifications/tests/Module/Notifications/Listeners/UserAssignmentChangedNotificationListenerTest.php @@ -44,9 +44,9 @@ final class UserAssignmentChangedNotificationListenerTest extends TestCase null, 'user.assignment_changed', $this->stringContains('Alice'), - $this->isType('string'), + $this->isString(), 'admin/users/edit/user-uuid', - $this->isType('array') + $this->isArray() ) ->willReturn(99); @@ -56,11 +56,11 @@ final class UserAssignmentChangedNotificationListenerTest extends TestCase 1, 'user.assignment_changed', $this->stringContains('Alice'), - $this->isType('string'), + $this->isString(), 'admin/users/edit/user-uuid', - $this->isType('array'), + $this->isArray(), 7, - $this->isType('array') + $this->isArray() ) ->willReturn(1); diff --git a/modules/notifications/tests/Module/Notifications/Listeners/UserDeactivatedNotificationListenerTest.php b/modules/notifications/tests/Module/Notifications/Listeners/UserDeactivatedNotificationListenerTest.php index 7573de0..30af1ab 100644 --- a/modules/notifications/tests/Module/Notifications/Listeners/UserDeactivatedNotificationListenerTest.php +++ b/modules/notifications/tests/Module/Notifications/Listeners/UserDeactivatedNotificationListenerTest.php @@ -51,7 +51,7 @@ final class UserDeactivatedNotificationListenerTest extends TestCase 'admin/users/edit/user-uuid', ['user_id' => 10, 'uuid' => 'user-uuid'], 5, - $this->isType('array') + $this->isArray() ); $this->listener->handle('user.deactivated', [ diff --git a/phpunit.xml b/phpunit.xml index fd3b16c..01e6619 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,7 +2,8 @@ + colors="true" + defaultTestSuite="CoreCore"> config