Ejemplo n.º 1
0
 public function testSetActive()
 {
     $this->proxy->setActive(true);
     $this->assertTrue($this->proxy->isActive());
     $this->proxy->setActive(false);
     $this->assertFalse($this->proxy->isActive());
 }
Ejemplo n.º 2
0
 public function testSetActivePhp53()
 {
     if (version_compare(phpversion(), '5.4.0', '>=')) {
         $this->markTestSkipped('Test skipped, for PHP 5.3 only.');
     }
     $this->proxy->setActive(true);
     $this->assertTrue($this->proxy->isActive());
     $this->proxy->setActive(false);
     $this->assertFalse($this->proxy->isActive());
 }
Ejemplo n.º 3
0
 public function testSetActivePhp53()
 {
     if (PHP_VERSION_ID >= 50400) {
         $this->markTestSkipped('Test skipped, for PHP 5.3 only.');
     }
     $this->proxy->setActive(true);
     $this->assertTrue($this->proxy->isActive());
     $this->proxy->setActive(false);
     $this->assertFalse($this->proxy->isActive());
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function getBag($name)
 {
     if (!isset($this->bags[$name])) {
         throw new \InvalidArgumentException(sprintf('The SessionBagInterface %s is not registered.', $name));
     }
     if ($this->saveHandler->isActive() && !$this->started) {
         $this->loadSession();
     } elseif (!$this->started) {
         $this->start();
     }
     return $this->bags[$name];
 }
Ejemplo n.º 5
0
 /**
  * @runInSeparateProcess
  * @preserveGlobalState disabled
  */
 public function testIsActive()
 {
     $this->assertFalse($this->proxy->isActive());
     session_start();
     $this->assertTrue($this->proxy->isActive());
 }