You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to skip Botman middleware in tests. The default Laravel Illuminate\Foundation\Testing\WithoutMiddleware trait doesn't disable Botman middleware in tests. I also tried to mock it but without success:
I have a CreateUniverse Matching middleware. First I resolve it through the Service Containter:
//// botman.php//$middleware = resolve(CreateUniverse::class);
$botman->hears('hi', function (BotMan$bot) {
$bot->reply('hello');
})->middleware($middleware);
Mockery\Exception\InvalidCountException: Method matching(<Any>) from Mockery_0_App_Http_Middleware_CreateUniverse should be called exactly 1 times but called 0 times.
It looks like my mock is not applied.
The text was updated successfully, but these errors were encountered:
chimit
changed the title
WithoutMiddleware doesn't work
How to mock or disable Botman middleware?
Nov 18, 2020
Description:
I need to skip Botman middleware in tests. The default Laravel
Illuminate\Foundation\Testing\WithoutMiddleware
trait doesn't disable Botman middleware in tests. I also tried to mock it but without success:I have a
CreateUniverse
Matching middleware. First I resolve it through the Service Containter:Then I'm trying to mock it:
But get an error:
It looks like my mock is not applied.
The text was updated successfully, but these errors were encountered: