public function testGetDomainDNFromDNError() { list($lw, $con, $um) = $this->getConnecterAndLdapMock(); $access = new Access($con, $lw, $um); $inputDN = 'foobar'; $expected = ''; $lw->expects($this->once())->method('explodeDN')->with($inputDN, 0)->will($this->returnValue(false)); $this->assertSame($expected, $access->getDomainDNFromDN($inputDN)); }