function ClosureComparatorSpec::it_accepts_only_closures in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php \spec\Prophecy\Comparator\ClosureComparatorSpec::it_accepts_only_closures()
File
- vendor/
phpspec/ prophecy/ spec/ Prophecy/ Comparator/ ClosureComparatorSpec.php, line 15
Class
Namespace
spec\Prophecy\ComparatorCode
function it_accepts_only_closures() {
$this
->accepts(123, 321)
->shouldReturn(false);
$this
->accepts('string', 'string')
->shouldReturn(false);
$this
->accepts(false, true)
->shouldReturn(false);
$this
->accepts(true, false)
->shouldReturn(false);
$this
->accepts((object) array(), (object) array())
->shouldReturn(false);
$this
->accepts(function () {
}, (object) array())
->shouldReturn(false);
$this
->accepts(function () {
}, (object) array())
->shouldReturn(false);
$this
->accepts(function () {
}, function () {
})
->shouldReturn(true);
}