Esempio n. 1
0
 public function testToArrayWithMetaData()
 {
     $this->storage->foo = 'bar';
     $this->storage->bar = 'baz';
     $this->storage->setMetadata('foo', 'bar');
     $expected = array('__ZF' => array('_REQUEST_ACCESS_TIME' => $this->storage->getRequestAccessTime(), 'foo' => 'bar'), 'foo' => 'bar', 'bar' => 'baz');
     $this->assertSame($expected, $this->storage->toArray(true));
 }
Esempio n. 2
0
 public function testRequestAccessTimeIsPreservedEvenInFactoryMethod()
 {
     $this->assertNotEmpty($this->storage->getRequestAccessTime());
     $this->storage->fromArray(array());
     $this->assertNotEmpty($this->storage->getRequestAccessTime());
 }