PHP Prophecy Mystery

1.5k Views Asked by At

I have $entity_type->isSubClassOf('Drupal\Core\Entity\FieldableEntityInterface')->willReturn(TRUE); and getting this very baffling error:

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

There are 1 best solutions below

0
On BEST ANSWER

Careful readers will observe the lower case c vs upper case c after isSub. I posted the problem to https://github.com/phpspec/prophecy/issues/249