Skip to content
Browse files

Remove bug in name of asserter in case of failure.

  • Loading branch information...
1 parent 72182cb commit 77c932758702f6b4e461e0d02a57a4933c11dfe0 @mageekguy mageekguy committed May 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 classes/test/asserter/generator.php
View
4 classes/test/asserter/generator.php
@@ -62,13 +62,13 @@ public function asserterFail(atoum\asserter $asserter, $reason)
$line = $backtrace['line'];
}
- if ($function === null && isset($backtrace['object']) === true && isset($backtrace['function']) === true && $backtrace['object'] === $this && $backtrace['function'] !== '__call')
+ if ($function === null && isset($backtrace['object']) === true && isset($backtrace['function']) === true && $backtrace['object'] === $asserter && $backtrace['function'] !== '__call')
{
$function = $backtrace['function'];
}
}
- throw new asserter\exception($reason, $this->test->getScore()->addFail($file, $line, $class, $method, get_class($this) . ($function ? '::' . $function : '') . '()', $reason));
+ throw new asserter\exception($reason, $this->test->getScore()->addFail($file, $line, $class, $method, get_class($asserter) . ($function ? '::' . $function : '') . '()', $reason));
}
public function getAsserterInstance($asserter, array $arguments = array())

0 comments on commit 77c9327

Please sign in to comment.
Something went wrong with that request. Please try again.