forked from BossaConsulting/phpspec2-expect
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed matcher-checks for phpspec 2 * Improved performance by limiting `debug_backtrace`
- Loading branch information
Showing
5 changed files
with
132 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/coverage | ||
/vendor | ||
.phpunit.result.cache | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use PhpSpec\Exception\Example\FailureException; | ||
use PhpSpec\Matcher\BasicMatcher; | ||
|
||
/** | ||
* Test fixture used in ExpectTest | ||
*/ | ||
class FooMatcher extends BasicMatcher | ||
{ | ||
public function supports(string $name, $subject, array $arguments): bool | ||
{ | ||
return 'haveFoo' === $name; | ||
} | ||
|
||
protected function matches($subject, array $arguments): bool | ||
{ | ||
return $subject === $arguments[0]; | ||
} | ||
|
||
protected function getFailureException(string $name, $subject, array $arguments): FailureException | ||
{ | ||
return new FailureException(); | ||
} | ||
|
||
protected function getNegativeFailureException(string $name, $subject, array $arguments): FailureException | ||
{ | ||
return new FailureException(); | ||
} | ||
} |