Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Actually instantiate and invoke the proper expector. #2

Merged
merged 1 commit into from

2 participants

@martymcguire

Whoops, turns out I didn't test it properly before. :)

@lorennorman lorennorman merged commit b0c6a85 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2012
  1. @martymcguire
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/MiniSpec/expector.php
View
7 src/MiniSpec/expector.php
@@ -21,9 +21,10 @@ public function __call($name, $arguments)
// throw new Exception("No expectation named ".$name);
// }
- if( array_key_exists($name, $expectations) ) {
- $expectations[$name]::matcher($this->subject, $arguments);
- } else {
+ if( array_key_exists($name, $this->expectations) ) {
+ $matcher = new $this->expectations[$name];
+ $matcher->matcher($this->subject, $arguments);
+ } else {
throw new Exception("No expectation named ".$name);
}
}
Something went wrong with that request. Please try again.