mcustiel/phiremock

List all expectations failed with annotation not found error

drudoi opened this issue · 1 comments

As documentation says expactations list is got with:

    use Mcustiel\Phiremock\Client\Phiremock;

    $phiremock = new Phiremock('phiremock.server', '8080');
    $expectations = $phiremock->listExpectations();

But this code failes with

[Doctrine\Common\Annotations\AnnotationException] [Semantical Error] The annotation "@Mcustiel\SimpleRequest\Annotation\Validator\NotNull" in property Mcustiel\Phiremock\Domain\Expectation::$request does not exist, or could not be auto-loaded.

This is because auto-loader is not registered in Doctrine\Common\Annotations\AnnotationRegistry.

Tests are green because the loader is registered in _bootstrap.php. I think that annotations should be registered in the box, and Client construct should be enough.

Added documentation to register the autoloader in README. Thanks for reporting this bug.