PHP预言之谜

时间:2016-01-21 18:11:36

标签: php phpunit prophecy

我有$entity_type->isSubClassOf('Drupal\Core\Entity\FieldableEntityInterface')->willReturn(TRUE);并且遇到了这个令人困惑的错误:

Prophecy\Exception\Call\UnexpectedCallException: Method call:
  - isSubclassOf("Drupal\Core\Entity\FieldableEntityInterface")
on Double\EntityTypeInterface\P121 was not expected, expected calls were:
  - isSubClassOf(exact("Drupal\Core\Entity\FieldableEntityInterface"))

1 个答案:

答案 0 :(得分:2)

isSub之后,细心的读者会观察小写c与大写c。我将问题发布到https://github.com/phpspec/prophecy/issues/249