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(); }
/** * 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'); }
public function testPassingNameToConstructorInstantiatesContainerWithThatName() { $container = new Container('foo', $this->manager); $this->assertEquals('foo', $container->getName()); }
public function testUsingNewZF2NamespaceIsValid() { $container = new Container('Zend\\Foo', $this->manager); $this->assertEquals('Zend\\Foo', $container->getName()); }