From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Wed, 19 Feb 2025 03:53:54 +0100
Subject: Modernize PHPUnit syntax

---
 test/EventManagerTest.php                         | 2 +-
 test/LazyListenerAggregateTest.php                | 2 +-
 test/Test/EventListenerIntrospectionTraitTest.php | 3 +++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/EventManagerTest.php b/test/EventManagerTest.php
index e70da79..c8f7ff7 100644
--- a/test/EventManagerTest.php
+++ b/test/EventManagerTest.php
@@ -58,7 +58,7 @@ final class EventManagerTest extends TestCase
         $value = $r->getValue($manager);
         self::assertIsArray($value);
         $keys = array_keys($value);
-        self::assertContainsOnly('string', $keys);
+        self::assertContainsOnlyString($keys);
         /** @psalm-var list<string> */
 
         return $keys;
diff --git a/test/LazyListenerAggregateTest.php b/test/LazyListenerAggregateTest.php
index b116fe2..402f222 100644
--- a/test/LazyListenerAggregateTest.php
+++ b/test/LazyListenerAggregateTest.php
@@ -182,7 +182,7 @@ final class LazyListenerAggregateTest extends TestCase
         $events = $this->createMock(EventManagerInterface::class);
         $events->expects(self::once())
             ->method('attach')
-            ->with('event', self::isType('callable'), 1)
+            ->with('event', self::isCallable(), 1)
             ->willReturnArgument(1);
 
         $listeners = [
diff --git a/test/Test/EventListenerIntrospectionTraitTest.php b/test/Test/EventListenerIntrospectionTraitTest.php
index 5c37fa2..32bb253 100644
--- a/test/Test/EventListenerIntrospectionTraitTest.php
+++ b/test/Test/EventListenerIntrospectionTraitTest.php
@@ -6,6 +6,7 @@ namespace LaminasTest\EventManager\Test;
 
 use Laminas\EventManager\EventManager;
 use Laminas\EventManager\Test\EventListenerIntrospectionTrait;
+use PHPUnit\Framework\Attributes\RequiresPhpunit;
 use PHPUnit\Framework\ExpectationFailedException;
 use PHPUnit\Framework\TestCase;
 use Traversable;
@@ -35,6 +36,7 @@ final class EventListenerIntrospectionTraitTest extends TestCase
         self::assertEquals(['foo', 'bar', 'baz'], $this->getEventsFromEventManager($this->events));
     }
 
+    #[RequiresPhpunit('<12')]
     public function testGetListenersForEventReturnsIteratorOfListenersForEventInPriorityOrder(): void
     {
         // @codingStandardsIgnoreStart
@@ -122,6 +124,7 @@ final class EventListenerIntrospectionTraitTest extends TestCase
         ], $listeners);
     }
 
+    #[RequiresPhpunit('<12')]
     public function testGetArrayOfListenersForEventReturnsArrayOfListenersInPriorityOrder(): void
     {
         // @codingStandardsIgnoreStart
