/** * @covers ZfcUser\Authentication\Storage\Db::read */ public function testReadWithoutResolvedEntitySetIdentityIntUserNotFound() { $this->storage->expects($this->once())->method('read')->will($this->returnValue(1)); $this->db->setStorage($this->storage); $this->mapper->expects($this->once())->method('findById')->with(1)->will($this->returnValue(false)); $this->db->setMapper($this->mapper); $result = $this->db->read(); $this->assertNull($result); }
protected function setAuthenticationUser() { $this->mapper->expects($this->once())->method('findByUsername')->with('ZfcUser')->will($this->returnValue($this->user)); $this->options->expects($this->once())->method('getAuthIdentityFields')->will($this->returnValue(array('username'))); }