Change travis config
This commit is contained in:
@@ -20,6 +20,7 @@ before_script:
|
|||||||
- phpenv config-add tests/php.ini
|
- phpenv config-add tests/php.ini
|
||||||
- composer install
|
- composer install
|
||||||
- wget https://phar.phpunit.de/phpunit.phar
|
- wget https://phar.phpunit.de/phpunit.phar
|
||||||
|
- php -i
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- php phpunit.phar -c tests/units.$DB.xml
|
- php phpunit.phar -c tests/units.$DB.xml
|
||||||
@@ -129,7 +129,6 @@ class Ldap extends Base
|
|||||||
$this->logger->error('Unable to connect to the LDAP server: "'.LDAP_SERVER.'"');
|
$this->logger->error('Unable to connect to the LDAP server: "'.LDAP_SERVER.'"');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
|
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||||
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
|
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
|
||||||
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 1);
|
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 1);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class LdapTest extends \Base
|
|||||||
$this->equalTo('my_ldap_server'),
|
$this->equalTo('my_ldap_server'),
|
||||||
$this->equalTo(389)
|
$this->equalTo(389)
|
||||||
)
|
)
|
||||||
->willReturn(true);
|
->will($this->returnValue('my_ldap_resource'));
|
||||||
|
|
||||||
$ldap = new Ldap($this->container);
|
$ldap = new Ldap($this->container);
|
||||||
$this->assertNotFalse($ldap->connect());
|
$this->assertNotFalse($ldap->connect());
|
||||||
@@ -66,7 +66,7 @@ class LdapTest extends \Base
|
|||||||
$this->equalTo('my_ldap_server'),
|
$this->equalTo('my_ldap_server'),
|
||||||
$this->equalTo(389)
|
$this->equalTo(389)
|
||||||
)
|
)
|
||||||
->willReturn(false);
|
->will($this->returnValue(false));
|
||||||
|
|
||||||
$ldap = new Ldap($this->container);
|
$ldap = new Ldap($this->container);
|
||||||
$this->assertFalse($ldap->connect());
|
$this->assertFalse($ldap->connect());
|
||||||
@@ -82,7 +82,7 @@ class LdapTest extends \Base
|
|||||||
$this->equalTo(null),
|
$this->equalTo(null),
|
||||||
$this->equalTo(null)
|
$this->equalTo(null)
|
||||||
)
|
)
|
||||||
->willReturn(true);
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$ldap = new Ldap($this->container);
|
$ldap = new Ldap($this->container);
|
||||||
$this->assertTrue($ldap->bind('my_ldap_connection', 'my_user', 'my_password', 'anonymous'));
|
$this->assertTrue($ldap->bind('my_ldap_connection', 'my_user', 'my_password', 'anonymous'));
|
||||||
@@ -98,7 +98,7 @@ class LdapTest extends \Base
|
|||||||
$this->equalTo('uid=my_user'),
|
$this->equalTo('uid=my_user'),
|
||||||
$this->equalTo('my_password')
|
$this->equalTo('my_password')
|
||||||
)
|
)
|
||||||
->willReturn(true);
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$ldap = new Ldap($this->container);
|
$ldap = new Ldap($this->container);
|
||||||
$this->assertTrue($ldap->bind('my_ldap_connection', 'my_user', 'my_password', 'user', 'uid=%s', 'something'));
|
$this->assertTrue($ldap->bind('my_ldap_connection', 'my_user', 'my_password', 'user', 'uid=%s', 'something'));
|
||||||
@@ -114,7 +114,7 @@ class LdapTest extends \Base
|
|||||||
$this->equalTo('someone'),
|
$this->equalTo('someone'),
|
||||||
$this->equalTo('something')
|
$this->equalTo('something')
|
||||||
)
|
)
|
||||||
->willReturn(true);
|
->will($this->returnValue(true));
|
||||||
|
|
||||||
$ldap = new Ldap($this->container);
|
$ldap = new Ldap($this->container);
|
||||||
$this->assertTrue($ldap->bind('my_ldap_connection', 'my_user', 'my_password', 'proxy', 'someone', 'something'));
|
$this->assertTrue($ldap->bind('my_ldap_connection', 'my_user', 'my_password', 'proxy', 'someone', 'something'));
|
||||||
|
|||||||
Reference in New Issue
Block a user