Skip to content

Commit

Permalink
Merge pull request #97 from MageTest/feature/96-matcher-improvements
Browse files Browse the repository at this point in the history
Improve quality of existing matcher
  • Loading branch information
James Cowie committed May 13, 2015
2 parents c09ccde + 3deb1c6 commit dfd6082
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/MageTest/PhpSpec/MagentoExtension/Matcher/BeInArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
class BeInArea extends BasicMatcher
{
private $representer;
private $presenter;

public function __construct(PresenterInterface $presenter)
{
Expand All @@ -54,7 +54,7 @@ public function supports($alias, $subject, array $arguments)

protected function matches($subject, array $arguments)
{
$subject->get('mage')->app()->getArea() === $arguments[0];
return $subject->get('mage')->app()->getArea() === $arguments[0];
}

protected function getFailureException($name, $subject, array $arguments)
Expand All @@ -70,7 +70,6 @@ protected function getFailureException($name, $subject, array $arguments)

protected function getNegativeFailureException($name, $subject, array $arguments)
{
$area = $subject->get('mage')->app()->getArea();
return new FailureException(sprintf(
'Expected %s not to be in area %s.',
$this->presenter->presentValue($subject),
Expand Down

0 comments on commit dfd6082

Please sign in to comment.