isRequestParameter('module', 'validation')->
  isRequestParameter('action', 'index')->
  isResponseHeader('X-Validated', 'ko')
;

$b->
  post('/validation/Index')->
  isRequestParameter('module', 'validation')->
  isRequestParameter('action', 'Index')->
  isResponseHeader('X-Validated', 'ko')
;

// needed to pass tests on case and non case sensitive machines
if (!file_exists(dirname(__FILE__).'/fixtures/apps/frontend/modules/validation/templates/IndexSuccess.php'))
{
  $b->throwsException('sfRenderException');
}

$b->
  post('/validation/INdex')->
  isStatusCode(404)
;

$b->
  post('/validation/index2')->
  isRequestParameter('module', 'validation')->
  isRequestParameter('action', 'index2')->
  isResponseHeader('X-Validated', 'ko')
;

if (!is_readable(dirname(__FILE__).'/fixtures/apps/frontend/modules/validation/templates/index2Success.php'))