|
|
@@ -20,8 +20,14 @@
|
|
|
* @version $Id$
|
|
|
*/
|
|
|
|
|
|
-/** PHPUnit_Framework_TestCase */
|
|
|
-require_once 'PHPUnit/Framework/TestCase.php';
|
|
|
+if (!defined('PHPUnit_MAIN_METHOD')) {
|
|
|
+ define('PHPUnit_MAIN_METHOD', 'Zend_Log_Formatter_SimpleTest::main');
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Test helper
|
|
|
+ */
|
|
|
+require_once dirname(__FILE__) . '/../../../TestHelper.php';
|
|
|
|
|
|
/** Zend_Log_Formatter_Simple */
|
|
|
require_once 'Zend/Log/Formatter/Simple.php';
|
|
|
@@ -36,6 +42,12 @@ require_once 'Zend/Log/Formatter/Simple.php';
|
|
|
*/
|
|
|
class Zend_Log_Formatter_SimpleTest extends PHPUnit_Framework_TestCase
|
|
|
{
|
|
|
+ public static function main()
|
|
|
+ {
|
|
|
+ $suite = new PHPUnit_Framework_TestSuite(__CLASS__);
|
|
|
+ $result = PHPUnit_TextUI_TestRunner::run($suite);
|
|
|
+ }
|
|
|
+
|
|
|
public function testConstructorThrowsOnBadFormatString()
|
|
|
{
|
|
|
try {
|
|
|
@@ -116,3 +128,7 @@ class Zend_Log_Formatter_SimpleTest_TestObject1 {
|
|
|
|
|
|
class Zend_Log_Formatter_SimpleTest_TestObject2 {
|
|
|
}
|
|
|
+
|
|
|
+if (PHPUnit_MAIN_METHOD == 'Zend_Log_Formatter_SimpleTest::main') {
|
|
|
+ Zend_Log_Formatter_SimpleTest::main();
|
|
|
+}
|