public function testResetAPIKeyBadCSRFToken()
 {
     $this->simulateLogin('*****@*****.**', false, true);
     $_POST['reset_api_key'] = 'Reset API Key';
     $_GET['csrf_token'] = parent::CSRF_TOKEN . 'lalla';
     $controller = new AccountConfigurationController(true);
     $results = $controller->go();
     try {
         $results = $controller->control();
         $this->fail("should throw InvalidCSRFTokenException");
     } catch (InvalidCSRFTokenException $e) {
         $this->assertIsA($e, 'InvalidCSRFTokenException');
     }
 }
 public function testLoadProperRSSUrlWithPlusSignInEmailAddress()
 {
     $this->debug(__METHOD__);
     $builder = $this->buildRSSData();
     $this->simulateLogin('*****@*****.**', true, true);
     $controller = new AccountConfigurationController(true);
     $this->assertTrue(isset($controller));
     $result = $controller->control();
     $this->debug($result);
     $this->assertPattern('/crawler\\/rss.php\\?un=me153\\%2Bcheckurlencoding%40example.com&as=c9089f3c9adaf0186f6ffb1ee8d6501c/', $result);
 }
 public function testAuthControlInviteUserNoCSRFToken()
 {
     $this->simulateLogin('*****@*****.**', false, true);
     $_SERVER['HTTP_HOST'] = "mytestthinkup/";
     $_SERVER['HTTPS'] = null;
     $_POST['invite'] = 'Create Invitation';
     $controller = new AccountConfigurationController(true);
     try {
         $results = $controller->control();
         $this->fail("should throw InvalidCSRFTokenException");
     } catch (InvalidCSRFTokenException $e) {
         $this->assertIsA($e, 'InvalidCSRFTokenException');
     }
 }