From 7c65b2f40ea9242260eac5a746863f5925423861 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 22 Sep 2013 22:39:41 +0200 Subject: Phing: added target for phpunit+selenium Functional tests were using an old selenium RC version. Ported them to use phpunit + selenium; next: opensauce --- tests/test_tools/functional_tests.php | 69 ----------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 tests/test_tools/functional_tests.php (limited to 'tests/test_tools/functional_tests.php') diff --git a/tests/test_tools/functional_tests.php b/tests/test_tools/functional_tests.php deleted file mode 100644 index 151f77db..00000000 --- a/tests/test_tools/functional_tests.php +++ /dev/null @@ -1,69 +0,0 @@ -_name=$name; - if($basePath==='' || ($this->_basePath=realpath($basePath))===false) - throw new Exception('Invalid base path '.$basePath); - $this->_basePath=strtr($this->_basePath,'\\','/'); - - $this->_selenium = $selenium.'selenium/'; - } - - public function run($simpleReporter) - { - $server=SimpleSeleniumProxyServer::getInstance(dirname(__FILE__));//, '', $this->_selenium); - - $groupTest=new GroupTest($this->_name); - $this->collectTestFiles($groupTest,$this->_basePath); - $groupTest->run($simpleReporter); - - $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 -- cgit v1.2.3