Author: maksim_ka
Date: 2010-02-03 13:48:49 +0100 (Wed, 03 Feb 2010)
New Revision: 27489
Modified:
plugins/sfPhpunitPlugin/branches/1.2/lib/task/sfPhpunitRuntestTask.class.php
plugins/sfPhpunitPlugin/branches/1.2/lib/test/sfBasePhpunitTestSuite.class.php
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitSeleniumTestCase.php
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitTestCase.class.php
Log:
[sfPhpunitPlugin][sf1.2] fix init task for windows platforms.
Modified:
plugins/sfPhpunitPlugin/branches/1.2/lib/task/sfPhpunitRuntestTask.class.php
===================================================================
---
plugins/sfPhpunitPlugin/branches/1.2/lib/task/sfPhpunitRuntestTask.class.php
2010-02-03 12:38:18 UTC (rev 27488)
+++
plugins/sfPhpunitPlugin/branches/1.2/lib/task/sfPhpunitRuntestTask.class.php
2010-02-03 12:48:49 UTC (rev 27489)
@@ -49,69 +49,16 @@
// $initTask = new sfPhpunitInitTask($this->dispatcher, $this->formatter);
// $initTask->run();
chdir(sfConfig::get('sf_root_dir'));
- shell_exec('php symfony phpunit:init');
+ shell_exec('symfony phpunit:init');
$path = $arguments['test'];
-//
-// $result =
sfPhpunitSuiteLoader::factory($path)->run($this->_getResult($options));
-// $result->flushListeners();
-//
-// $printer = new PHPUnit_TextUI_ResultPrinter();
-// $printer->printResult($result);
-// $command = new sfPhpunitCommand();
-//
-// $a = $_SERVER['argv'];
-// unset($a[0], $a[1]);
-// $a[0] = 'test.php';
-// $a[1] = 'test.php';
-// ksort($a);
-// $command->convertSymfonyOptionsToPhpunit($a);
-//
-// var_Dump($a, $command->getArguments());
-// die;
-//
-//
$runner = new PHPUnit_TextUI_TestRunner();
$runner->doRun(
sfPhpunitSuiteLoader::factory($path)->getSuite(),
$this->_handleArguments($options));
}
-// /**
-// * @return PHPUnit_Framework_TestResult
-// */
-// protected function _getResult(array $options = array())
-// {
-//// $arguments = array();
-////
-//// if ($options['colors']) $arguments['colors'] = true;
-//// if ($options['verbose']) $arguments['verbose'] = true;
-//// if ($options['debug']) $arguments['debug'] = true;
-////
-//// if ($options['log-junit']) $arguments['junitLogfile'] =
$options['log-junit'];
-//// if ($options['log-junit']) $arguments['junitLogfile'] =
$options['log-junit'];
-////
-////
-//// return $arguments;
-////
-////
-// $printer = new PHPUnit_TextUI_ResultPrinter();
-// $printer->write(PHPUnit_Runner_Version::getVersionString() . "\n\n");
-//
-// $result = new PHPUnit_Framework_TestResult();
-// $result->addListener($printer);
-//
-// if ($options['log-junit']) {
-// require_once 'PHPUnit/Util/Log/JUnit.php';
-// $result->addListener(new PHPUnit_Util_Log_JUnit($options['log-junit'],
true));
-// $result->collectCodeCoverageInformation(TRUE);
-// }
-//
-//
-// return $result;
-// }
-
protected function _handleArguments(array $options = array())
{
$arguments = array();
Modified:
plugins/sfPhpunitPlugin/branches/1.2/lib/test/sfBasePhpunitTestSuite.class.php
===================================================================
---
plugins/sfPhpunitPlugin/branches/1.2/lib/test/sfBasePhpunitTestSuite.class.php
2010-02-03 12:38:18 UTC (rev 27488)
+++
plugins/sfPhpunitPlugin/branches/1.2/lib/test/sfBasePhpunitTestSuite.class.php
2010-02-03 12:48:49 UTC (rev 27489)
@@ -115,7 +115,7 @@
{
$reflection = new ReflectionClass($this);
$path = str_replace('.php', '', $reflection->getFileName());
- $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit/') + 8,
0);
+ $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit' .
DIRECTORY_SEPARATOR) + 8, 0);
return $path;
}
Modified:
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitSeleniumTestCase.php
===================================================================
---
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitSeleniumTestCase.php
2010-02-03 12:38:18 UTC (rev 27488)
+++
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitSeleniumTestCase.php
2010-02-03 12:48:49 UTC (rev 27489)
@@ -49,7 +49,7 @@
{
$reflection = new ReflectionClass($this);
$path = dirname($reflection->getFileName());
- $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit/') + 8,
0);
+ $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit' .
DIRECTORY_SEPARATOR) + 8, 0);
return $path;
}
@@ -58,7 +58,7 @@
{
$reflection = new ReflectionClass($this);
$path = str_replace('.php', '', $reflection->getFileName());
- $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit/') + 8,
0);
+ $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit' .
DIRECTORY_SEPARATOR) + 8, 0);
return $path;
}
Modified:
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitTestCase.class.php
===================================================================
---
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitTestCase.class.php
2010-02-03 12:38:18 UTC (rev 27488)
+++
plugins/sfPhpunitPlugin/branches/1.2/lib/testcase/sfBasePhpunitTestCase.class.php
2010-02-03 12:48:49 UTC (rev 27489)
@@ -54,7 +54,7 @@
{
$reflection = new ReflectionClass($this);
$path = dirname($reflection->getFileName());
- $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit/') + 8,
0);
+ $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit' .
DIRECTORY_SEPARATOR) + 8, 0);
return $path;
}
@@ -63,7 +63,7 @@
{
$reflection = new ReflectionClass($this);
$path = str_replace('.php', '', $reflection->getFileName());
- $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit/') + 8,
0);
+ $path = substr_replace($path, 'fixtures/', strpos($path, 'phpunit' .
DIRECTORY_SEPARATOR) + 8, 0);
return $path;
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.