示例#1
0
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Ldap');
     $suite->addTestSuite('Zend_Ldap_OfflineTest');
     $suite->addTestSuite('Zend_Ldap_AttributeTest');
     $suite->addTestSuite('Zend_Ldap_ConverterTest');
     $suite->addTest(Zend_Ldap_Dn_AllTests::suite());
     $suite->addTestSuite('Zend_Ldap_FilterTest');
     $suite->addTest(Zend_Ldap_Node_AllTests::suite());
     $suite->addTest(Zend_Ldap_Ldif_AllTests::suite());
     if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED') && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
         $suite->addTestSuite('Zend_Ldap_ConnectTest');
         $suite->addTestSuite('Zend_Ldap_BindTest');
         $suite->addTestSuite('Zend_Ldap_CanonTest');
         $suite->addTestSuite('Zend_Ldap_SearchTest');
         $suite->addTestSuite('Zend_Ldap_CrudTest');
         $suite->addTestSuite('Zend_Ldap_CopyRenameTest');
         $suite->addTestSuite('Zend_Ldap_ChangePasswordTest');
     } else {
         $suite->addTest(new Zend_Ldap_SkipOnlineTests());
     }
     return $suite;
 }
示例#2
0
    public static function suite()
    {
        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Ldap_Node');
        $suite->addTestSuite('Zend_Ldap_Node_OfflineTest');
        $suite->addTestSuite('Zend_Ldap_Node_AttributeIterationTest');
        if (defined('TESTS_ZEND_LDAP_ONLINE_ENABLED') && constant('TESTS_ZEND_LDAP_ONLINE_ENABLED')) {
            $suite->addTestSuite('Zend_Ldap_Node_OnlineTest');
            $suite->addTestSuite('Zend_Ldap_Node_ChildrenTest');
            $suite->addTestSuite('Zend_Ldap_Node_ChildrenIterationTest');
            $suite->addTestSuite('Zend_Ldap_Node_UpdateTest');
            $suite->addTestSuite('Zend_Ldap_Node_RootDseTest');
            $suite->addTestSuite('Zend_Ldap_Node_SchemaTest');
        } else {
            $suite->addTest(new Zend_Ldap_Node_SkipOnlineTests());
        }
        return $suite;
    }
}
class Zend_Ldap_Node_SkipOnlineTests extends PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->markTestSkipped('Zend_Ldap_Node online tests not enabled in TestConfiguration.php');
    }
    public function testNothing()
    {
    }
}
if (PHPUnit_MAIN_METHOD == 'Zend_Ldap_Node_AllTests::main') {
    Zend_Ldap_Node_AllTests::main();
}