public function testBothParamsExistentInstanceNoCSRFToken() { $builder = FixtureBuilder::build('instances', array('id' => 12, 'is_public' => 1)); $this->simulateLogin('*****@*****.**', true, true); $_GET['u'] = '12'; $_GET['p'] = '0'; $controller = new TogglePublicInstanceController(true); try { $results = $controller->control(); $this->fail("should throw InvalidCSRFTokenException"); } catch (InvalidCSRFTokenException $e) { $this->assertIsA($e, 'InvalidCSRFTokenException'); } }