mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix LdapResourceFormTest
This commit is contained in:
parent
c32f9ae735
commit
6ef0af8927
@ -26,7 +26,7 @@ class LdapResourceFormTest extends BaseTestCase
|
||||
public function testValidLdapResourceIsValid()
|
||||
{
|
||||
$this->setUpResourceFactoryMock(
|
||||
Mockery::mock()->shouldReceive('testCredentials')->once()->andReturn(true)->getMock()
|
||||
Mockery::mock()->shouldReceive('connect')->once()->shouldReceive('bind')->once()->getMock()
|
||||
);
|
||||
|
||||
// Passing array(null) is required to make Mockery call the constructor...
|
||||
@ -49,7 +49,7 @@ class LdapResourceFormTest extends BaseTestCase
|
||||
public function testInvalidLdapResourceIsNotValid()
|
||||
{
|
||||
$this->setUpResourceFactoryMock(
|
||||
Mockery::mock()->shouldReceive('testCredentials')->once()->andThrow('\Exception')->getMock()
|
||||
Mockery::mock()->shouldReceive('connect')->once()->shouldReceive('bind')->andThrow('\Exception')->getMock()
|
||||
);
|
||||
|
||||
// Passing array(null) is required to make Mockery call the constructor...
|
||||
|
Loading…
x
Reference in New Issue
Block a user