Permalink
Browse files

Do not mark undefined steps as failed

  • Loading branch information...
everzet committed Feb 12, 2014
1 parent 3690b9c commit a12154aae8a09248637fbca8ef3b2ef2ac71f2aa
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/Behat/Behat/Formatter/JUnitFormatter.php
@@ -227,11 +227,13 @@ public function afterOutlineExample(OutlineExampleEvent $event)
public function afterStep(StepEvent $event)
{
if ($event->hasException()) {
- $this->exceptions[] = $event->getException();
- $this->exceptionsCount++;
- if ($event->getResult() === StepEvent::SKIPPED || $event->getResult() === StepEvent::PENDING) {
+ if ($event->getResult() === StepEvent::SKIPPED
+ || $event->getResult() === StepEvent::PENDING
+ || $event->getResult() === StepEvent::UNDEFINED) {

This comment has been minimized.

Show comment
Hide comment
@stloyd

stloyd Feb 12, 2014

Contributor

in_array($event->getResult(), array(), true) ? =)

@stloyd

stloyd Feb 12, 2014

Contributor

in_array($event->getResult(), array(), true) ? =)

$this->pendingCount++;
} else {
+ $this->exceptions[] = $event->getException();
+ $this->exceptionsCount++;
$this->failureCount++;
}
}

0 comments on commit a12154a

Please sign in to comment.