Skip to content

Instantly share code, notes, and snippets.

@shupp
Created August 16, 2010 21:01
Show Gist options
  • Save shupp/527732 to your computer and use it in GitHub Desktop.
Save shupp/527732 to your computer and use it in GitHub Desktop.
<?php
require_once 'ControllerTestCase.php';
require_once APPLICATION_PATH . '/controllers/ErrorController.php';
class ErrorControllerTest extends ControllerTestCase
{
public function test404Action()
{
$this->getRequest()->setMethod('GET');
$this->getRequest()->setPathInfo('/foobardoesnotexist');
$this->application->run();
$this->assertSame(404, $this->getResponse()->getHttpResponseCode());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment