svn: /pear/ci/phpuc/trunk/ NormalUnitTests.php
| From: | Daniel O'Connor | Date: | Wed, 29 Sep 2010 23:08:29 +0000 |
| Subject: | svn: /pear/ci/phpuc/trunk/ NormalUnitTests.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-60437@lists.php.net to get a copy of this message | ||
clockwerx Wed, 29 Sep 2010 23:08:29 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=303882
Log:
Bootstrap for Mail_Queue handling
Changed paths:
U pear/ci/phpuc/trunk/NormalUnitTests.php
Modified: pear/ci/phpuc/trunk/NormalUnitTests.php
===================================================================
--- pear/ci/phpuc/trunk/NormalUnitTests.php 2010-09-29 22:51:31 UTC (rev 303881)
+++ pear/ci/phpuc/trunk/NormalUnitTests.php 2010-09-29 23:08:29 UTC (rev 303882)
@@ -32,11 +32,12 @@
<exec executable="phpunit" dir="${basedir}"
failonerror="on">
<?php if (extension_loaded('xdebug')) { ?>
<arg line="--log-junit <?php print $p->cruisecontrol;
?>/projects/<?php print $p->package; ?>/build/logs/junit.xml
+ <?php print $this->getBootstrap($p); ?>
--coverage-xml <?php print $p->cruisecontrol;
?>/projects/<?php print $p->package; ?>/build/logs/phpunit.coverage.xml
--coverage-html <?php print $p->cruisecontrol;
?>/projects/<?php print $p->package; ?>/build/coverage
<?php print $this->getTestPath($p); ?>" />
<?php } else { ?>
- <arg line="--log-junit <?php print $p->cruisecontrol;
?>/projects/<?php print $p->package; ?>/build/logs/junit.xml
+ <arg line="--log-junit <?php print $p->cruisecontrol;
?>/projects/<?php print $p->package; ?>/build/logs/junit.xml <?php print
$this->getBootstrap($p); ?>
<?php print $this->getTestPath($p); ?>" />
<?php } ?>
</exec>
@@ -82,6 +83,14 @@
return false;
}
+ /** @todo Refactor this when 10 other packages have bootstraps? */
+ public function getBootstrap(Package $p) {
+ if ($p->package == "Mail_Queue") {
+ return "--bootstrap " . $p->source . "/" . $p->package .
"/tests/TestInit.php";
+ }
+ return "";
+ }
+
/**
* Iterate over a given directory to find all PHPUnit tests, and phpt tests
*/