Exemplo n.º 1
0
 public function testPassingUnsetKeyInArrayToSetExpirationSecondsDoesNothing()
 {
     $this->container->setExpirationSeconds(3600, array('foo'));
     $storage = $this->manager->getStorage();
     $metadata = $storage->getMetadata($this->container->getName());
     $this->assertFalse(isset($metadata['EXPIRE_KEYS']['foo']));
 }
 public function indexAction()
 {
     $session = new Container('base');
     $session->bar = 'foobar';
     echo $session->bar;
     echo $session->getName();
     return new ViewModel();
 }
Exemplo n.º 3
0
 /**
  * Start over with the upgrade process in case of an error.
  *
  * @return mixed
  */
 public function resetAction()
 {
     foreach (array_keys($this->cookie->getAllValues()) as $k) {
         unset($this->cookie->{$k});
     }
     $storage = $this->session->getManager()->getStorage();
     $storage[$this->session->getName()] = new ArrayObject([], ArrayObject::ARRAY_AS_PROPS);
     return $this->forwardTo('Upgrade', 'Home');
 }
Exemplo n.º 4
0
 public function testPassingNameToConstructorInstantiatesContainerWithThatName()
 {
     $container = new Container('foo', $this->manager);
     $this->assertEquals('foo', $container->getName());
 }
Exemplo n.º 5
0
 public function testUsingNewZF2NamespaceIsValid()
 {
     $container = new Container('Zend\\Foo', $this->manager);
     $this->assertEquals('Zend\\Foo', $container->getName());
 }