Diff
Property changes:
Name: svk:merge
- d6e91ea2-e33a-0410-98df-1d493bd67c58:/:181
+ d6e91ea2-e33a-0410-98df-1d493bd67c58:/:182
Modified: branches/0.2.0/build/build.xml (181 => 182)
--- branches/0.2.0/build/build.xml 2008-01-09 16:46:32 UTC (rev 181)
+++ branches/0.2.0/build/build.xml 2008-01-09 16:57:33 UTC (rev 182)
@@ -44,7 +44,7 @@
<property name="spec.src.default" value="${project.basedir}/.." />
<property name="spec.src.classpath" value="/src" />
<property name="spec.name" value="PHPSpec" />
- <property name="spec.version" value="0.2.0" /> <!-- VERSION FOR EDITING -->
+ <property name="spec.version" value="0.2.1" /> <!-- VERSION FOR EDITING -->
<property name="spec.stability" value="stable" />
<property name="spec.svn.baseurl" value="http://phpspec.googlecode.com/svn/" />
<property name="spec.svn.url" value="${svn.url}/trunk" />
@@ -216,6 +216,11 @@
<install as="phpspec.bat" name="scripts/phpspec.bat" />
</release>
+ <changelog version="0.2.1" date="2008-01-09" license="LGPL">
+ * Fixes a minor output bug missed in QA for HTML and TEXT
+ reporters
+ </changelog>
+
<changelog version="0.2.0" date="2008-01-09" license="LGPL">
* Added support for HTML reporting output
* Added support for executing specs from a HTTP Runner
Modified: branches/0.2.0/src/PHPSpec/Context.php (181 => 182)
--- branches/0.2.0/src/PHPSpec/Context.php 2008-01-09 16:46:32 UTC (rev 181)
+++ branches/0.2.0/src/PHPSpec/Context.php 2008-01-09 16:57:33 UTC (rev 182)
@@ -171,6 +171,10 @@
public function fail($message = null)
{
+ if (is_null($message)) {
+ $message = 'Deliberate Fail';
+ }
+
throw new PHPSpec_Runner_DeliberateFailException($message);
}
Modified: branches/0.2.0/src/PHPSpec/Runner/Reporter/Html.php (181 => 182)
--- branches/0.2.0/src/PHPSpec/Runner/Reporter/Html.php 2008-01-09 16:46:32 UTC (rev 181)
+++ branches/0.2.0/src/PHPSpec/Runner/Reporter/Html.php 2008-01-09 16:57:33 UTC (rev 182)
@@ -208,7 +208,7 @@
private function renderFailures(){
- if ($this->_result->countFailures() > 0) {
+ if ($this->_result->countFailures() > 0 || $this->_result->countDeliberateFailures() > 0) {
?>
<div id="failures">
<h2>Failures</h2>
@@ -222,7 +222,18 @@
<code class="message"><?php echo $failure->getFailedMessage(); ?></code>
</div>
<?php
- }?>
+ }?>
+ <?php
+ $failed = $this->_result->getTypes('deliberateFail');
+ foreach ($failed as $failure) {
+ ?>
+ <div class="failure">
+ <span class="context"><?php echo $this->_format($failure->getContextDescription()); ?></span>
+ <span class="spec"><?php echo $failure->getSpecificationText(); ?> FAILED</span>
+ <code class="message"><?php echo $failure->getMessage(); ?></code>
+ </div>
+ <?php
+ }?>
</div>
<?php
}
@@ -239,7 +250,7 @@
?>
<div class="error">
<span class="context"><?php echo $this->_format($error->getContextDescription()); ?></span>
- <span class="spec"><?php echo $error->getSpecificationText(); ?> FAILED</span>
+ <span class="spec"><?php echo $error->getSpecificationText(); ?> ERROR</span>
<code class="message"><?php echo $error->toString(); ?></code>
</div>
<?php
@@ -260,7 +271,7 @@
?>
<div class="exception">
<span class="context"><?php echo $this->_format($exception->getContextDescription()); ?></span>
- <span class="spec"><?php echo $exception->getSpecificationText(); ?> FAILED</span>
+ <span class="spec"><?php echo $exception->getSpecificationText(); ?> EXCEPTION</span>
<code class="message"><?php echo $exception->toString(); ?></code>
</div>
<?php
@@ -281,7 +292,7 @@
?>
<div class="exception">
<span class="context"><?php echo $this->_format($pending->getContextDescription()); ?></span>
- <span class="spec"><?php echo $pending->getSpecificationText(); ?> FAILED</span>
+ <span class="spec"><?php echo $pending->getSpecificationText(); ?> PENDING</span>
<code class="message"><?php echo $pending->getMessage(); ?></code>
</div>
<?php
Modified: branches/0.2.0/src/PHPSpec/Runner/Reporter/Text.php (181 => 182)
--- branches/0.2.0/src/PHPSpec/Runner/Reporter/Text.php 2008-01-09 16:46:32 UTC (rev 181)
+++ branches/0.2.0/src/PHPSpec/Runner/Reporter/Text.php 2008-01-09 16:57:33 UTC (rev 182)
@@ -82,7 +82,7 @@
}
$reportedIssues = PHP_EOL . PHP_EOL;
- if ($this->_result->countFailures() > 0) {
+ if ($this->_result->countFailures() > 0 || $this->_result->countDeliberateFailures() > 0) {
$reportedIssues .= 'Failures:' . PHP_EOL . PHP_EOL;
$failed = $this->_result->getTypes('fail');
$increment = 1;