Skip to content

Instantly share code, notes, and snippets.

@greg606
Created August 16, 2010 20:56
Show Gist options
  • Save greg606/527715 to your computer and use it in GitHub Desktop.
Save greg606/527715 to your computer and use it in GitHub Desktop.
<?php
/**
* Get PHPUnit
*/
//require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Framework/IncompleteTestError.php';
require_once 'PHPUnit/Framework/TestCase.php';
require_once 'PHPUnit/Framework/TestSuite.php';
require_once 'PHPUnit/Runner/Version.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once 'PHPUnit/Util/Filter.php';
/*
* Set error reporting level
*/
error_reporting( E_ALL | E_STRICT );
/**
* Default timezone
*/
date_default_timezone_set('Europe/Warsaw');
/*
* Set the include path
*/
$root = realpath(dirname(__FILE__) . '/../../');
$paths = array(
get_include_path(),
"$root/library",
"$root/tests",
"$root/application"
);
set_include_path(implode(PATH_SEPARATOR, $paths));
defined('APPLICATION_PATH')
or define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
/**
* Get the base test case
*/
require_once 'ControllerTestCase.php';
/**
* Start session now!
*/
Zend_Session::$_unitTestEnabled = true;
Zend_Session::start();
/**
* Ignore folders from code coverage etc
*/
//PHPUnit_Util_Filter::addDirectoryToFilter("$root/tests");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment