/** * @covers ULogin\Auth::hasSession() */ public function testSession() { // check return $session = $this->invokeMethod($this->auth, 'hasSession', array()); $this->assertTrue($session, "[-] Session does not configured in DI"); //@todo check user data $sessionContainer = $this->di->get('session'); $sessionContainer->set(Auth::KEY, array(1, 2, 3)); // check while service destroyed $this->di->offsetUnset('session'); $session = $this->invokeMethod($this->auth, 'hasSession', array()); $this->assertFalse($session, "[-] Session must be destroyed"); }