Skip to content

Instantly share code, notes, and snippets.

@greg606
Created August 16, 2010 20:55
Show Gist options
  • Save greg606/527711 to your computer and use it in GitHub Desktop.
Save greg606/527711 to your computer and use it in GitHub Desktop.
<?php
require_once 'Zend/Application.php';
require_once 'Zend/Test/PHPUnit/ControllerTestCase.php';
class ControllerTestCase extends Zend_Test_PHPUnit_ControllerTestCase
{
public $application;
public function setUp()
{
$this->application = new Zend_Application(
'testing',
APPLICATION_PATH . '/configs/application.ini'
);
$this->bootstrap = array($this, 'appBootstrap');
parent::setUp();
}
public function tearDown()
{
$this->resetRequest()->resetResponse();
$this->request->setPost(array());
$this->request->setQuery(array());
}
public function appBootstrap()
{
$this->application->bootstrap();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment