mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-07 00:26:48 +01:00
* Fix "method_argument_space" * Fix "control_structure_continuation_position" * Fix "new_with_parentheses" * Fix "blank_line_before_statement" * Fix "visibility_required" * Fix some "array_indentation" * Fix some "array_indentation" - unify all "rcube::raise_error" calls * rm useless eslint ignores and add rules counts * sort eslint ignores * fix eslint ignores grammar * Revert "Fix "blank_line_before_statement"" * fix CS 3.46.0
31 lines
830 B
PHP
31 lines
830 B
PHP
<?php
|
|
|
|
/**
|
|
* Test class to test rcube_ldap class
|
|
*/
|
|
class Framework_Ldap extends PHPUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
* Class constructor
|
|
*/
|
|
public function test_class()
|
|
{
|
|
// skip test if Net_LDAP3 does not exist
|
|
if (!class_exists('Net_LDAP3')) {
|
|
$this->markTestSkipped('The Net_LDAP3 package not available.');
|
|
}
|
|
|
|
// skip test if php-ldap is not available
|
|
if (!extension_loaded('ldap')) {
|
|
$this->markTestSkipped('The ldap extension is not available.');
|
|
}
|
|
|
|
StderrMock::start();
|
|
$object = new rcube_ldap([]);
|
|
StderrMock::stop();
|
|
|
|
$this->assertInstanceOf('rcube_ldap', $object, 'Class constructor');
|
|
$this->assertSame('ERROR: Could not connect to any LDAP server', trim(StderrMock::$output));
|
|
}
|
|
}
|