Skip to content

Instantly share code, notes, and snippets.

@prufrock
Created March 31, 2011 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prufrock/895753 to your computer and use it in GitHub Desktop.
Save prufrock/895753 to your computer and use it in GitHub Desktop.
A skeleton for Zend Framework controller tests.
<?php
if(!defined('TEST_PATH')){
DEFINE('TEST_PATH', '../..');
}//if
require_once TEST_PATH . '/library/ControllerTestCase.php';
require_once APPLICATION_PATH . '/controllers/SkeletonController.php';
/**
* Test class for SkeletonController.
*/
class SkeletonControllerTest extends ControllerTestCase {
public function testCallingControllerWithoutActionShouldPullFromIndexAction()
{
$this->dispatch('/skeleton');
$this->assertResponseCode(200);
$this->assertController('skeleton');
$this->assertAction('index');
}//testCallingControllerWithoutActionShouldPullFromIndexAction
}//SkeletonControllerTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment