From: David Prévot <taffit@debian.org>
Date: Sat, 7 Feb 2026 10:56:29 +0100
Subject: Compatibility with recent PHPUnit (13)

Use assertContainsOnlyInstancesOf() instead of assertContainsOnly().
---
 tests/KeyTest.php | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/KeyTest.php b/tests/KeyTest.php
index 9ace480..72855ae 100644
--- a/tests/KeyTest.php
+++ b/tests/KeyTest.php
@@ -115,7 +115,7 @@ class KeyTest extends Crypt_GPG_TestCase
             'Failed to assert number of returned sub-keys is the same as ' .
             'the number of sub-keys added.');
 
-        $this->assertContainsOnly('Crypt_GPG_SubKey', $subKeys, false,
+        $this->assertContainsOnlyInstancesOf('Crypt_GPG_SubKey', $subKeys, false,
             'Failed to assert all returned sub-keys are Crypt_GPG_SubKey ' .
             'objects.');
 
@@ -161,7 +161,7 @@ class KeyTest extends Crypt_GPG_TestCase
             'Failed to assert number of returned user ids is the same as ' .
             'the number of user ids added.');
 
-        $this->assertContainsOnly('Crypt_GPG_UserId', $userIds, false,
+        $this->assertContainsOnlyInstancesOf('Crypt_GPG_UserId', $userIds, false,
             'Failed to assert all returned user ids are Crypt_GPG_UserId ' .
             'objects.');
 
@@ -395,7 +395,7 @@ class KeyTest extends Crypt_GPG_TestCase
             'Failed to assert number of returned sub-keys is the same as ' .
             'the number of sub-keys added.');
 
-        $this->assertContainsOnly('Crypt_GPG_SubKey', $subKeys, false,
+        $this->assertContainsOnlyInstancesOf('Crypt_GPG_SubKey', $subKeys, false,
             'Failed to assert all returned sub-keys are Crypt_GPG_SubKey ' .
             'objects.');
 
@@ -427,7 +427,7 @@ class KeyTest extends Crypt_GPG_TestCase
             'Failed to assert number of returned sub-keys is the same as ' .
             'the number of sub-keys added.');
 
-        $this->assertContainsOnly('Crypt_GPG_SubKey', $subKeys, false,
+        $this->assertContainsOnlyInstancesOf('Crypt_GPG_SubKey', $subKeys, false,
             'Failed to assert all returned sub-keys are Crypt_GPG_SubKey ' .
             'objects.');
 
@@ -473,7 +473,7 @@ class KeyTest extends Crypt_GPG_TestCase
             'Failed to assert number of returned user ids is the same as ' .
             'the number of user ids added.');
 
-        $this->assertContainsOnly('Crypt_GPG_UserId', $userIds, false,
+        $this->assertContainsOnlyInstancesOf('Crypt_GPG_UserId', $userIds, false,
             'Failed to assert all returned user ids are Crypt_GPG_UserId ' .
             'objects.');
 
@@ -499,7 +499,7 @@ class KeyTest extends Crypt_GPG_TestCase
             'Failed to assert number of returned user ids is the same as ' .
             'the number of user ids added.');
 
-        $this->assertContainsOnly('Crypt_GPG_UserId', $userIds, false,
+        $this->assertContainsOnlyInstancesOf('Crypt_GPG_UserId', $userIds, false,
             'Failed to assert all returned user ids are Crypt_GPG_UserId ' .
             'objects.');
 
