mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Fix LdapResourceFormTest
This commit is contained in:
parent
c32f9ae735
commit
6ef0af8927
@ -26,7 +26,7 @@ class LdapResourceFormTest extends BaseTestCase
|
|||||||
public function testValidLdapResourceIsValid()
|
public function testValidLdapResourceIsValid()
|
||||||
{
|
{
|
||||||
$this->setUpResourceFactoryMock(
|
$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...
|
// Passing array(null) is required to make Mockery call the constructor...
|
||||||
@ -49,7 +49,7 @@ class LdapResourceFormTest extends BaseTestCase
|
|||||||
public function testInvalidLdapResourceIsNotValid()
|
public function testInvalidLdapResourceIsNotValid()
|
||||||
{
|
{
|
||||||
$this->setUpResourceFactoryMock(
|
$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...
|
// Passing array(null) is required to make Mockery call the constructor...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user