test some environment

wrap test output
This commit is contained in:
Sebastian Mendel
2007-03-16 11:51:57 +00:00
parent a738c7435c
commit 5272b1be7d
2 changed files with 43 additions and 1 deletions

View File

@@ -18,16 +18,22 @@ if (! defined('PMA_MAIN_METHOD')) {
*/
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
//require_once 'PHPUnit/Util/TestDox/ResultPrinter.php.';
require_once './test/FailTest.php';
require_once './test/PMA_get_real_size_test.php';
require_once './test/PMA_sanitize_test.php';
require_once './test/PMA_pow_test.php';
require_once './test/Environment_test.php';
class AllTests
{
public static function main()
{
PHPUnit_TextUI_TestRunner::run(self::suite());
$parameters = array();
//$parameters['testdoxHTMLFile'] = true;
//$parameters['printer'] = PHPUnit_Util_TestDox_ResultPrinter::factory('HTML');
//$parameters['printer'] = PHPUnit_Util_TestDox_ResultPrinter::factory('Text');
PHPUnit_TextUI_TestRunner::run(self::suite(), $parameters);
}
public static function suite()
@@ -35,6 +41,7 @@ class AllTests
$suite = new PHPUnit_Framework_TestSuite('phpMyAdmin');
//$suite->addTestSuite('FailTest');
$suite->addTestSuite('Environment_test');
$suite->addTestSuite('PMA_get_real_size_test');
$suite->addTestSuite('PMA_sanitize_test');
$suite->addTestSuite('PMA_pow_test');
@@ -43,6 +50,8 @@ class AllTests
}
if (PMA_MAIN_METHOD == 'AllTests::main') {
echo '<pre>';
AllTests::main();
echo '</pre>';
}
?>

33
test/Environment_test.php Normal file
View File

@@ -0,0 +1,33 @@
<?php
/* vim: expandtab sw=4 ts=4 sts=4: */
/**
* tests for environment like OS, PHP, modules, ...
*
* @version $Id$
* @package phpMyAdmin-test
*/
/**
*
*/
require_once 'PHPUnit/Framework.php';
class Environment_test extends PHPUnit_Framework_TestCase
{
public function testPhpVersion()
{
$this->assertTrue(version_compare('4.1', phpversion(), '<='),
'phpMyAdmin requires PHP 4.1 or above');
}
public function testMySQL()
{
$this->markTestIncomplete();
}
public function testSession()
{
$this->markTestIncomplete();
}
}
?>