Created
March 31, 2011 03:08
-
-
Save prufrock/895753 to your computer and use it in GitHub Desktop.
A skeleton for Zend Framework controller tests.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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