From f3dcbfe146782d2c7dec8760651e79605ddc96e7 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 26 Oct 2021 16:43:39 +0200 Subject: Fix PHP 8.1 support for user_ldap application MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/user_ldap/tests/AccessTest.php | 2 +- apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/user_ldap/tests') diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index e1f262165f5..16f79d7819d 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -559,7 +559,7 @@ class AccessTest extends TestCase { ->expects($this->any()) ->method('isResource') ->willReturnCallback(function ($resource) { - return is_resource($resource); + return is_resource($resource) || is_object($resource); }); $this->ldap ->expects($this->any()) diff --git a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php index c171fa06b55..fa46f73054c 100644 --- a/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php +++ b/apps/user_ldap/tests/Integration/ExceptionOnLostConnection.php @@ -146,7 +146,7 @@ class ExceptionOnLostConnection { * tests whether a curl operation ran successfully. If not, an exception * is thrown * - * @param resource $ch + * @param resource|\CurlHandle $ch * @param mixed $result * @throws \Exception */ @@ -182,7 +182,7 @@ class ExceptionOnLostConnection { /** * initializes a curl handler towards the toxiproxy LDAP proxy service - * @return resource + * @return resource|\CurlHandle */ private function getCurl() { $ch = curl_init(); -- cgit v1.2.3