1 month ago

Calling TestCase methods within a response macro?

Posted 1 month ago by JohnRivs

I have this situation where I want to create a macro for this response:


From this macro, I wanna call some things on $this but at this point, $this is no longer the test class; it's a TestResponse.

\Illuminate\Testing\TestResponse::macro('assertSomething', function () {
	// I can no longer do the following.

How can I get access to the test class?

Please sign in or create an account to participate in this conversation.