diff options
author | xue <> | 2006-07-07 14:54:15 +0000 |
---|---|---|
committer | xue <> | 2006-07-07 14:54:15 +0000 |
commit | 61bb16ee2e5f0a66234e1575242169a10fde47b5 (patch) | |
tree | 3ee24dcc36ceae2c213130df1ea3d5c9fc110a27 /tests/FunctionalTests/PradoTester.php | |
parent | 7b84938b1b5964f2274d66e28ba17435924ffe35 (diff) |
Merge from 3.0 branch till 1253.
Diffstat (limited to 'tests/FunctionalTests/PradoTester.php')
-rw-r--r-- | tests/FunctionalTests/PradoTester.php | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/tests/FunctionalTests/PradoTester.php b/tests/FunctionalTests/PradoTester.php deleted file mode 100644 index 0c83217e..00000000 --- a/tests/FunctionalTests/PradoTester.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php
-
-$SIMPLE_TEST = dirname(__FILE__).'/../UnitTests';
-
-require_once($SIMPLE_TEST.'/simpletest/unit_tester.php');
-require_once($SIMPLE_TEST.'/simpletest/web_tester.php');
-require_once($SIMPLE_TEST.'/simpletest/mock_objects.php');
-require_once($SIMPLE_TEST.'/simpletest/reporter.php');
-require(dirname(__FILE__).'/selenium/php/selenium.php');
-
-class PradoTester
-{
- private $_name;
- private $_basePath;
-
- public function __construct($basePath,$name='All Tests')
- {
- $this->_name=$name;
- if($basePath==='' || ($this->_basePath=realpath($basePath))===false)
- throw new Exception('Invalid base path '.$basePath);
- $this->_basePath=strtr($this->_basePath,'\\','/');
- }
-
- public function run($simpleReporter)
- {
- $groupTest=new GroupTest($this->_name);
- $this->collectTestFiles($groupTest,$this->_basePath);
- $groupTest->run($simpleReporter);
-
- $server=SimpleSeleniumProxyServer::getInstance(dirname(__FILE__));
- $server->handleRequest();
- }
-
- protected function collectTestFiles($groupTest,$basePath)
- {
- $folder=@opendir($basePath);
- while($entry=@readdir($folder))
- {
- $fullPath=strtr($basePath.'/'.$entry,'\\','/');
- if(is_file($fullPath) && $this->isValidFile($entry))
- $groupTest->addTestFile($fullPath);
- else if($entry[0]!=='.')
- $this->collectTestFiles($groupTest,$fullPath);
- }
- @closedir($folder);
- }
-
- protected function isValidFile($entry)
- {
- return preg_match('/\w+\.php$/',$entry);
- }
-}
-
-?>
\ No newline at end of file |