public
Description: My mirror of phpspec
Homepage: http://www.phpspec.org/
Clone URL: git://github.com/tedkulp/phpspec.git
Hectic output fixes!

git-svn-id: http://phpspec.googlecode.com/svn/trunk@180 
d6e91ea2-e33a-0410-98df-1d493bd67c58
padraic.brady (author)
Wed Jan 09 08:41:51 -0800 2008
commit  963399e6b56792e29b3825576ffd057ae9fccff0
tree    3ae898a92f8a5d8d2f7f91d2e029fb3583144673
parent  da66357fedfde5630894581d502d1db9d7d60b96
...
44
45
46
47
 
48
49
50
...
216
217
218
 
 
 
 
 
219
220
221
...
44
45
46
 
47
48
49
50
...
216
217
218
219
220
221
222
223
224
225
226
0
@@ -44,7 +44,7 @@ Other Targets:
0
     <property name="spec.src.default" value="${project.basedir}/.." />
0
     <property name="spec.src.classpath" value="/src" />
0
     <property name="spec.name" value="PHPSpec" />
0
- <property name="spec.version" value="0.2.0" /> <!-- VERSION FOR EDITING -->
0
+ <property name="spec.version" value="0.2.1" /> <!-- VERSION FOR EDITING -->
0
     <property name="spec.stability" value="stable" />
0
     <property name="spec.svn.baseurl" value="http://phpspec.googlecode.com/svn/" />
0
     <property name="spec.svn.url" value="${svn.url}/trunk" />
0
@@ -216,6 +216,11 @@ Other Targets:
0
                 <install as="phpspec.bat" name="scripts/phpspec.bat" />
0
             </release>
0
 
0
+ <changelog version="0.2.1" date="2008-01-09" license="LGPL">
0
+ * Fixes a minor output bug missed in QA for HTML and TEXT
0
+ reporters
0
+ </changelog>
0
+
0
       <changelog version="0.2.0" date="2008-01-09" license="LGPL">
0
                 * Added support for HTML reporting output
0
         * Added support for executing specs from a HTTP Runner
...
171
172
173
 
 
 
 
174
175
176
...
171
172
173
174
175
176
177
178
179
180
0
@@ -171,6 +171,10 @@ class PHPSpec_Context implements Countable
0
 
0
     public function fail($message = null)
0
     {
0
+ if (is_null($message)) {
0
+ $message = 'Deliberate Fail';
0
+ }
0
+
0
         throw new PHPSpec_Runner_DeliberateFailException($message);
0
     }
0
 
...
208
209
210
211
 
212
213
214
...
222
223
224
225
 
 
 
 
 
 
 
 
 
 
 
 
226
227
228
...
239
240
241
242
 
243
244
245
...
260
261
262
263
 
264
265
266
...
281
282
283
284
 
285
286
287
...
208
209
210
 
211
212
213
214
...
222
223
224
 
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
...
250
251
252
 
253
254
255
256
...
271
272
273
 
274
275
276
277
...
292
293
294
 
295
296
297
298
0
@@ -208,7 +208,7 @@ class PHPSpec_Runner_Reporter_Html extends PHPSpec_Runner_Reporter {
0
 
0
 
0
   private function renderFailures(){
0
- if ($this->_result->countFailures() > 0) {
0
+ if ($this->_result->countFailures() > 0 || $this->_result->countDeliberateFailures() > 0) {
0
     ?>
0
     <div id="failures">
0
       <h2>Failures</h2>
0
@@ -222,7 +222,18 @@ class PHPSpec_Runner_Reporter_Html extends PHPSpec_Runner_Reporter {
0
           <code class="message"><?php echo $failure->getFailedMessage(); ?></code>          
0
         </div>
0
         <?php        
0
- }?>
0
+ }?>
0
+ <?php
0
+ $failed = $this->_result->getTypes('deliberateFail');
0
+ foreach ($failed as $failure) {
0
+ ?>
0
+ <div class="failure">
0
+ <span class="context"><?php echo $this->_format($failure->getContextDescription()); ?></span>
0
+ <span class="spec"><?php echo $failure->getSpecificationText(); ?> FAILED</span>
0
+ <code class="message"><?php echo $failure->getMessage(); ?></code>
0
+ </div>
0
+ <?php
0
+ }?>
0
     </div>
0
     <?php
0
     }
0
@@ -239,7 +250,7 @@ class PHPSpec_Runner_Reporter_Html extends PHPSpec_Runner_Reporter {
0
         ?>
0
         <div class="error">
0
           <span class="context"><?php echo $this->_format($error->getContextDescription()); ?></span>
0
- <span class="spec"><?php echo $error->getSpecificationText(); ?> FAILED</span>
0
+ <span class="spec"><?php echo $error->getSpecificationText(); ?> ERROR</span>
0
           <code class="message"><?php echo $error->toString(); ?></code>          
0
         </div>
0
         <?php        
0
@@ -260,7 +271,7 @@ class PHPSpec_Runner_Reporter_Html extends PHPSpec_Runner_Reporter {
0
         ?>
0
         <div class="exception">
0
           <span class="context"><?php echo $this->_format($exception->getContextDescription()); ?></span>
0
- <span class="spec"><?php echo $exception->getSpecificationText(); ?> FAILED</span>
0
+ <span class="spec"><?php echo $exception->getSpecificationText(); ?> EXCEPTION</span>
0
           <code class="message"><?php echo $exception->toString(); ?></code>          
0
         </div>
0
         <?php        
0
@@ -281,7 +292,7 @@ class PHPSpec_Runner_Reporter_Html extends PHPSpec_Runner_Reporter {
0
         ?>
0
         <div class="exception">
0
           <span class="context"><?php echo $this->_format($pending->getContextDescription()); ?></span>
0
- <span class="spec"><?php echo $pending->getSpecificationText(); ?> FAILED</span>
0
+ <span class="spec"><?php echo $pending->getSpecificationText(); ?> PENDING</span>
0
           <code class="message"><?php echo $pending->getMessage(); ?></code>          
0
         </div>
0
         <?php        
...
82
83
84
85
 
86
87
88
...
82
83
84
 
85
86
87
88
0
@@ -82,7 +82,7 @@ class PHPSpec_Runner_Reporter_Text extends PHPSpec_Runner_Reporter
0
         }
0
         
0
         $reportedIssues = PHP_EOL . PHP_EOL;
0
- if ($this->_result->countFailures() > 0) {
0
+ if ($this->_result->countFailures() > 0 || $this->_result->countDeliberateFailures() > 0) {
0
             $reportedIssues .= 'Failures:' . PHP_EOL . PHP_EOL;
0
             $failed = $this->_result->getTypes('fail');
0
             $increment = 1;

Comments

    No one has commented yet.