protected function removeCSRF($app)
{
// Symfony forms need a CSRF token so we have to mock this too
$csrf = $this->getMockCsrfTokenManager(['isTokenValid', 'getToken']);
$csrf->expects($this->any())->method('isTokenValid')->will($this->returnValue(true));
$csrf->expects($this->any())->method('getToken')->will($this->returnValue('xyz'));
$app['form.csrf_provider'] = $csrf;
}