Last active
August 29, 2015 14:06
-
-
Save ibrasho/0e7bdda2cd671a4dc2a2 to your computer and use it in GitHub Desktop.
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
<?php | |
class SomethingSpec extends ObjectBehavior | |
{ | |
function it_contains_an_instance_of(Class $object) | |
{ | |
$this->getArray()->shouldContainAnInstanceOf($object); | |
} | |
public function getMatchers() | |
{ | |
return [ | |
'containAnInstanceOf' => function($subject, $instance) { | |
return is_array($subject) && false !== array_walk($instance, $subject); | |
} | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment