谁能向我解释为什么后续测试没有通过?
被测代码
public function doesItExist( $obj, $dataSet ){
if( $dataSet->contains( $obj ) ){
return true;
}
return false;
}
phpspec 测试
function it_should_check_if_it_exists( \stdClass $s ){
$dataSet = new \SplObjectStorage();
$dataSet->attach($s);
$this->doesItExist( $s, $dataSet )->shouldReturn(true);
}