LaravelLaravel & VueJsVueJs

An approach to testing middleware



Laravel rockstar TJ Miller posted a short and sweet post how how he tested a middleware that forces requests to respond with JSON.

So what I’ve done here is define custom testing routes and applied the middleware as I would use it in the application routes, in this case global middleware and as middleware for the api group. This allows me to assert that the middleware is configured and functioning correctly.

https://medium.com/@sixlive/an-approach-to-testing-middleware-c547fc942848

http://platform.twitter.com/widgets.js




Source link
★ READ ALSO ★  Small Rating Component For Vue 2.x

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close