Skip to content

Request help w Mock_Libraries_* #421

@rlefever

Description

@rlefever

I am running a test of a controller that returns void. It automates pulling data via an API call and updates a db table.

In the test, since I am using request, I addCallables which point to Mock_Libraries.

When the Controller attempts to load the class being mocked, I get a response about the Resource exists but is not an Instance of that class. This therefore returns a 500 vs a 200.

Also, when I use the Mock_Libraries and try to use verifyInvoked causes 'Call to undefined method 'expects'.

Should that method be added to the Mock_Libraries_ file?

Is there a better way?

Is there a way to verify invocation on MonkeyPatched calls?

I found MonkeyPatch::verifyInvoke methods in the docs, but I get 0 invocations even though the logs show the patched response is returned. Do the verifyInvoked method params have to match values used in the controller?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions