public function testAuthService() { $app = Cookie::getFacadeApplication(); $auth = $this->getAuthService(); Cookie::setFacadeApplication($auth->getCubex()); $this->assertInstanceOf('\\Cubex\\ServiceManager\\Services\\AuthService', $auth); /** * @var $auth \Cubex\ServiceManager\Services\AuthService */ $this->assertFalse($auth->logout()); $this->assertFalse($auth->isLoggedIn()); $this->assertInstanceOf('\\Cubex\\Auth\\IAuthedUser', $auth->login('valid', 'password')); $this->assertTrue($auth->isLoggedIn()); $this->assertEquals('cubex_login', $auth->getCookieName()); $cookies = Cookie::getJar(); /** * @var $cookies CookieJar */ $this->assertTrue($cookies->hasQueued('cubex_login')); Cookie::setFacadeApplication($app); }
public function testDelete() { Cookie::delete('deletetest'); $this->assertTrue(Cookie::getJar()->hasQueued('deletetest')); }