{"action":"created","issue":{"url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking/issues/7","repository_url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking","labels_url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking/issues/7/comments","events_url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking/issues/7/events","html_url":"https://github.com/NoelDeMartin/laravel-dusk-mocking/issues/7","id":315117546,"number":7,"title":"Unable to Retrieve Mock for Mail Facade","user":{"login":"jcrawford","id":875341,"avatar_url":"https://avatars1.githubusercontent.com/u/875341?v=4","gravatar_id":"","url":"https://api.github.com/users/jcrawford","html_url":"https://github.com/jcrawford","followers_url":"https://api.github.com/users/jcrawford/followers","following_url":"https://api.github.com/users/jcrawford/following{/other_user}","gists_url":"https://api.github.com/users/jcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrawford/subscriptions","organizations_url":"https://api.github.com/users/jcrawford/orgs","repos_url":"https://api.github.com/users/jcrawford/repos","events_url":"https://api.github.com/users/jcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/jcrawford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-04-17T15:39:58Z","updated_at":"2018-04-17T17:00:08Z","closed_at":null,"author_association":"NONE","body":"I have implemented the code as in your README but I am getting the following error.\r\n\r\n```Exception: Unable to retrieve mock for [Illuminate\\Support\\Facades\\Mail].```\r\n\r\nHere is the output from running the tests.\r\n\r\n```\r\nPHPUnit 7.1.3 by Sebastian Bergmann and contributors.\r\n\r\nE....                                                               5 / 5 (100%)\r\n\r\nTime: 7.78 seconds, Memory: 12.00MB\r\n\r\nThere was 1 error:\r\n\r\n1) Tests\\Browser\\ContactTest::testPhoneNotRequired\r\nException: Unable to retrieve mock for [Illuminate\\Support\\Facades\\Mail].\r\n\r\n/Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/noeldemartin/laravel-dusk-mocking/src/MockingProxy.php:50\r\n/Users/jcrawford/Dropbox/CodeSamples/php-contact-form/tests/Browser/ContactTest.php:32\r\n/Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:67\r\n/Users/jcrawford/Dropbox/CodeSamples/php-contact-form/tests/Browser/ContactTest.php:33\r\n\r\nERRORS!\r\nTests: 5, Assertions: 9, Errors: 1.\r\n```\r\n\r\nHere is the stack trace from the logs.\r\n\r\n```\r\n[2018-04-17 15:37:55] local.ERROR: Only arrays and Traversables can be unpacked {\"exception\":\"[object] (ErrorException(code: 0): Only arrays and Traversables can be unpacked at /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/noeldemartin/laravel-dusk-mocking/src/Http/Controllers/MockingController.php:18)\r\n[stacktrace]\r\n#0 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/noeldemartin/laravel-dusk-mocking/src/Http/Controllers/MockingController.php(18): Illuminate\\\\Foundation\\\\Bootstrap\\\\HandleExceptions->handleError(2, 'Only arrays and...', '/Users/jcrawfor...', 18, Array)\r\n#1 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(48): NoelDeMartin\\\\LaravelDusk\\\\Http\\\\Controllers\\\\MockingController->mock()\r\n#2 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Route.php(212): Illuminate\\\\Routing\\\\ControllerDispatcher->dispatch(Object(Illuminate\\\\Routing\\\\Route), Object(NoelDeMartin\\\\LaravelDusk\\\\Http\\\\Controllers\\\\MockingController), 'mock')\r\n#3 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Route.php(169): Illuminate\\\\Routing\\\\Route->runController()\r\n#4 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Router.php(659): Illuminate\\\\Routing\\\\Route->run()\r\n#5 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\\\Routing\\\\Router->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#6 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/noeldemartin/laravel-dusk-mocking/src/Http/Middleware/SaveMocking.php(19): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#7 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): NoelDeMartin\\\\LaravelDusk\\\\Http\\\\Middleware\\\\SaveMocking->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#8 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#9 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/noeldemartin/laravel-dusk-mocking/src/Http/Middleware/StartMocking.php(21): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#10 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): NoelDeMartin\\\\LaravelDusk\\\\Http\\\\Middleware\\\\StartMocking->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#11 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#12 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#13 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Routing\\\\Middleware\\\\SubstituteBindings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#14 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#15 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(67): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#16 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\VerifyCsrfToken->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#17 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#18 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#19 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\View\\\\Middleware\\\\ShareErrorsFromSession->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#20 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#21 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#22 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Session\\\\Middleware\\\\StartSession->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#23 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#24 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#25 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Cookie\\\\Middleware\\\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#26 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#27 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#28 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Cookie\\\\Middleware\\\\EncryptCookies->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#29 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#30 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#31 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Router.php(661): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\r\n#32 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\r\n#33 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Router.php(602): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\r\n#34 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Router.php(591): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\r\n#35 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\r\n#36 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#37 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#38 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\\\\Proxy\\\\TrustProxies->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#39 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#40 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#41 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#42 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#43 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#44 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#45 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#46 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#47 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\ValidatePostSize->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#48 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#49 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#50 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\CheckForMaintenanceMode->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\r\n#51 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#52 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\r\n#53 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\r\n#54 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\r\n#55 /Users/jcrawford/Dropbox/CodeSamples/php-contact-form/public/index.php(55): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\r\n#56 {main}\r\n\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking/issues/comments/382067438","html_url":"https://github.com/NoelDeMartin/laravel-dusk-mocking/issues/7#issuecomment-382067438","issue_url":"https://api.github.com/repos/NoelDeMartin/laravel-dusk-mocking/issues/7","id":382067438,"user":{"login":"jcrawford","id":875341,"avatar_url":"https://avatars1.githubusercontent.com/u/875341?v=4","gravatar_id":"","url":"https://api.github.com/users/jcrawford","html_url":"https://github.com/jcrawford","followers_url":"https://api.github.com/users/jcrawford/followers","following_url":"https://api.github.com/users/jcrawford/following{/other_user}","gists_url":"https://api.github.com/users/jcrawford/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrawford/subscriptions","organizations_url":"https://api.github.com/users/jcrawford/orgs","repos_url":"https://api.github.com/users/jcrawford/repos","events_url":"https://api.github.com/users/jcrawford/events{/privacy}","received_events_url":"https://api.github.com/users/jcrawford/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T17:00:08Z","updated_at":"2018-04-17T17:00:08Z","author_association":"NONE","body":"yes to get the latest error I added decode to both arguments and facade.\r\n\r\nwhich driver would you suggest I try?"}}
{"actor":{"display_login":"jcrawford"}}