From d591b4d2da067d2d2d3aa3e2dd2b3efa14ff4af2 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 2 May 2020 21:55:55 +0200 Subject: [PATCH] [ticket/16462] Skip tests that require the LDAP extension PHPBB3-16462 --- tests/auth/provider_ldap_test.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auth/provider_ldap_test.php b/tests/auth/provider_ldap_test.php index 0bc9961f52..1ba47fd1f4 100644 --- a/tests/auth/provider_ldap_test.php +++ b/tests/auth/provider_ldap_test.php @@ -53,11 +53,21 @@ class phpbb_auth_provider_ldap_test extends phpbb_database_test_case */ public function test_init() { + if (!extension_loaded('ldap')) + { + $this->markTestSkipped('LDAP extension not available.'); + } + $this->assertFalse($this->provider->init()); } public function test_login() { + if (!extension_loaded('ldap')) + { + $this->markTestSkipped('LDAP extension not available.'); + } + $username = 'admin'; $password = 'adminadmin';