Author: maksim_ka
Date: 2010-04-07 16:36:25 +0200 (Wed, 07 Apr 2010)
New Revision: 29035
Added:
plugins/sfPhpunitPlugin/branches/1.4/data/unit/AllTests.tpl
Modified:
plugins/sfPhpunitPlugin/branches/1.4/data/unit/BasePhpunitTestSuite.tpl
plugins/sfPhpunitPlugin/branches/1.4/lib/task/sfPhpunitInitTask.class.php
Log:
[sfPhpunitPlugin][sf1.4] AllTests.php in test/phpunit allow us to run all tests
using standart phpunit command.
Added: plugins/sfPhpunitPlugin/branches/1.4/data/unit/AllTests.tpl
===================================================================
--- plugins/sfPhpunitPlugin/branches/1.4/data/unit/AllTests.tpl
(rev 0)
+++ plugins/sfPhpunitPlugin/branches/1.4/data/unit/AllTests.tpl 2010-04-07
14:36:25 UTC (rev 29035)
@@ -0,0 +1,14 @@
+<?php
+
+require_once 'PHPUnit/Framework.php';
+require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
+
+new ProjectConfiguration();
+
+class AllTests
+{
+ public static function suite()
+ {
+ return sfPhpunitSuiteLoader::factory()->getSuite();
+ }
+}
\ No newline at end of file
Modified:
plugins/sfPhpunitPlugin/branches/1.4/data/unit/BasePhpunitTestSuite.tpl
===================================================================
--- plugins/sfPhpunitPlugin/branches/1.4/data/unit/BasePhpunitTestSuite.tpl
2010-04-07 14:36:14 UTC (rev 29034)
+++ plugins/sfPhpunitPlugin/branches/1.4/data/unit/BasePhpunitTestSuite.tpl
2010-04-07 14:36:25 UTC (rev 29035)
@@ -1,14 +1,5 @@
<?php
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-require_once 'PHPUnit/TextUI/Command.php';
-
-require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
-require_once
dirname(__FILE__).'/../../plugins/sfPhpunitPlugin/lib/test/sfBasePhpunitTestSuite.class.php';
-require_once
dirname(__FILE__).'/../../plugins/sfPhpunitPlugin/lib/test/sfPhpunitContextInitilizerInterface.php';
-
-
class {className} extends sfBasePhpunitTestSuite
implements sfPhpunitContextInitilizerInterface
{
@@ -30,13 +21,4 @@
{
return '{application}';
}
-
- public static function suite()
- {
- ///init context
- $suite = new self();
- $suite->setupContext();
-
- return sfPhpunitSuiteLoader::factory()->getSuite();
- }
}
\ No newline at end of file
Modified:
plugins/sfPhpunitPlugin/branches/1.4/lib/task/sfPhpunitInitTask.class.php
===================================================================
--- plugins/sfPhpunitPlugin/branches/1.4/lib/task/sfPhpunitInitTask.class.php
2010-04-07 14:36:14 UTC (rev 29034)
+++ plugins/sfPhpunitPlugin/branches/1.4/lib/task/sfPhpunitInitTask.class.php
2010-04-07 14:36:25 UTC (rev 29035)
@@ -54,13 +54,12 @@
protected function _initBaseClasses()
{
-// $this->_createClass(
-// '','unit/BasePhpunitTestCase.tpl', array('className' =>
'BasePhpunitTestCase'));
-
$this->_createSuiteClass(
'', 'unit/BasePhpunitTestSuite.tpl', array(
'className' => 'BasePhpunitTestSuite',
'application' => $this->getFirstApplication()));
+
+ $this->_createFile('AllTests.php', 'unit/AllTests.tpl');
}
protected function _initFixturesDirs(PHPUnit_Framework_TestSuite $suite =
null)
--
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.