Exemplo 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));
 }
Exemplo n.º 2
0
 public function testClearWithArgumentRemovesExistingDataForThatKeyOnly()
 {
     $this->storage->foo = 'bar';
     $this->storage->bar = 'baz';
     $this->storage->clear('foo');
     $data = $this->storage->toArray();
     $this->assertSame(array('bar' => 'baz'), $data);
 }