Created
August 24, 2014 17:15
-
-
Save jwalton512/1c12e8a50d17245cdcdd to your computer and use it in GitHub Desktop.
phpspec callback matcher
This file contains hidden or 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
function it_handles_register_command(MemberRepository $members) | |
{ | |
$command = new MemberRegisterCommand('email', 'password', 'password'); | |
$members->save(Argument::that(function($member) { | |
return ($member->email == 'email' && $member->password == 'password'); | |
}))->shouldBeCalled(); | |
$this->handle($command)->shouldBeAnInstanceOf(MemberRegisterCommandResponse::class); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment