Exemplo n.º 1
0
 /**
  * Return whether the session has changed
  *
  * @return  bool
  */
 public function hasChanged()
 {
     return parent::hasChanged() || false === empty($this->namespaces) || false === empty($this->removedNamespaces);
 }
Exemplo n.º 2
0
 public function testTrackingChangesWorks()
 {
     $ns = new SessionNamespace();
     $this->assertFalse($ns->hasChanged(), 'A new empty session namespace seems to have changes');
     $ns->test = 1;
     $this->assertTrue($ns->hasChanged(), 'A new session namespace with values seems not to have changes');
 }