Пример #1
0
 public function testInitByRequest()
 {
     $this->session->expects($this->once())->method('getSessionId')->will($this->returnValue('asdfhasdfjhkj2198sadf8sdf897'));
     $this->visitor->initByRequest(null);
     $this->assertEquals('asdfhasdfjhkj2198sadf8sdf897', $this->visitor->getSessionId());
     $this->visitor->setData(['visitor_id' => 1]);
     $this->visitor->initByRequest(null);
     $this->assertNull($this->visitor->getSessionId());
 }