【问题标题】:PHP Prophecy MysteryPHP预言之谜
【发布时间】:2016-02-07 22:22:18
【问题描述】:

我有 $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"))

【问题讨论】:

    标签: php phpunit prophecy


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-11
      • 2020-08-29
      • 1970-01-01
      • 1970-01-01
      • 2015-10-31
      • 2010-12-22
      相关资源
      最近更新 更多