PHP 预言之谜
PHP Prophecy Mystery
我 $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"))
细心的读者会在isSub
之后观察小写c与大写c的对比。我将问题发布到 https://github.com/phpspec/prophecy/issues/249
我 $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"))
细心的读者会在isSub
之后观察小写c与大写c的对比。我将问题发布到 https://github.com/phpspec/prophecy/issues/249