Esempio n. 1
0
 /**
  * @covers ZfcUser\Authentication\Adapter\Db::setMapper
  * @covers ZfcUser\Authentication\Adapter\Db::getMapper
  */
 public function testSetGetMapper()
 {
     $mapper = new \ZfcUser\Mapper\User();
     $mapper->setTableName('zfcUser');
     $this->db->setMapper($mapper);
     $this->assertInstanceOf('ZfcUser\\Mapper\\User', $this->db->getMapper());
     $this->assertSame('zfcUser', $this->db->getMapper()->getTableName());
 }
Esempio n. 2
0
 /**
  * @covers ZfcUser\Authentication\Adapter\Db::setHydrator
  * @covers ZfcUser\Authentication\Adapter\Db::getHydrator
  */
 public function testSetHydrator()
 {
     $this->db->setHydrator($this->hydrator);
     $this->assertSame($this->hydrator, $this->db->getHydrator());
 }
Esempio n. 3
0
 /**
  * Returns the storage handler
  *
  * Non-persistent storage is used by default unless a different storage adapter has been set.
  *
  * @return Storage\StorageInterface
  */
 public function getStorage()
 {
     if (null === $this->storage) {
         $this->setStorage(new \Zend\Authentication\Storage\NonPersistent());
     }
     return parent::getStorage();
 }