public function testModifyBadCsrf()
{
$csrf = $this->getMockCsrfTokenManager();
$csrf->expects($this->any())->method('isTokenValid')->will($this->returnValue(false));
$this->setService('csrf', $csrf);
// First test should exit/redirect with no anti CSRF token
$this->setRequest(Request::create('/bolt/user/disable/2'));
$response = $this->controller()->modify('disable', 1);
$info = $this->getFlashBag()->get('error');
$this->assertRegExp('/Something went wrong/', $info[0]);
$this->assertEquals('/bolt/users', $response->getTargetUrl());
}