Exemplo n.º 1
0
 /**
  * @covers ZfcUser\Authentication\Storage\Db::write
  */
 public function testWrite()
 {
     $reflectionClass = new \ReflectionClass('ZfcUser\\Authentication\\Storage\\Db');
     $reflectionProperty = $reflectionClass->getProperty('resolvedIdentity');
     $reflectionProperty->setAccessible(true);
     $this->storage->expects($this->once())->method('write')->with('zfcUser');
     $this->db->setStorage($this->storage);
     $this->db->write('zfcUser');
     $this->assertNull($reflectionProperty->getValue($this->db));
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 public function write($contents)
 {
     parent::write($contents);
     $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this, ['user' => $this->read()]);
 }