1<?php 2/** 3 * Skip LDAP based tests if we don't have ldap or Horde_Ldap. 4 * 5 * PHP version 5 6 * 7 * @category Kolab 8 * @package Kolab_Server 9 * @author Gunnar Wrobel <wrobel@pardus.de> 10 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 11 * @link http://pear.horde.org/index.php?package=Kolab_Server 12 */ 13 14/** 15 * Prepare the test setup. 16 */ 17require_once __DIR__ . '/TestCase.php'; 18 19/** 20 * Skip LDAP based tests if we don't have ldap or Horde_Ldap. 21 * 22 * Copyright 2009-2016 Horde LLC (http://www.horde.org/) 23 * 24 * See the enclosed file COPYING for license information (LGPL). If you 25 * did not receive this file, see http://www.horde.org/licenses/lgpl21. 26 * 27 * @category Kolab 28 * @package Kolab_Server 29 * @author Gunnar Wrobel <wrobel@pardus.de> 30 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 31 * @link http://pear.horde.org/index.php?package=Kolab_Server 32 */ 33class Horde_Kolab_Server_LdapTestCase extends Horde_Kolab_Server_TestCase 34{ 35 public function skipIfNoLdap() 36 { 37 if (!extension_loaded('ldap') && !@dl('ldap.' . PHP_SHLIB_SUFFIX)) { 38 $this->markTestSkipped('Ldap extension is missing!'); 39 }; 40 41 if (!class_exists('Horde_Ldap')) { 42 $this->markTestSkipped('Horde_Ldap is not installed!'); 43 } 44 } 45}