Fix LdapResourceFormTest

This commit is contained in:
Johannes Meyer 2015-06-23 16:56:34 +02:00
parent c32f9ae735
commit 6ef0af8927

View File

@ -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...