@bugsysha I think where I'm coming from is the scenario that I often like to write tests against API endpoints or controllers to test various things. Maybe you can call that integration test, I don't know what the technical terminology is but for example lets say I had an API endpoint which in my scenario updates 15 preferences for a user.
So I write up a test like it_will_store_preference_with_valid_data
This test creates the payload of 15 attributes that need to pass validation, makes the API request then checks the response to ensure it's 201. As well, it asserts the database has the appropriate values stored.
From a purist standpoint this would not be unit test by any means. It's touching a real database, validation is running when I'm not really testing that etc.
But this is a useful test for my scenarios where I want to build APIs in a TDD way.
The only problem I ran into was that when creating 15 attributes to pass validation, I need to spend time to write code which will pass validation. But perhaps I don't really want to test that and instead want to ensure the API will trigger an email.
So in my mind just mock the request to be valid, and assert an email or event is triggered.
I take it that instead of mocking the request, you would prefer injecting another class that handles validation (calls a request form), and then you mock this class instead?
I guess I should share more concrete code examples ;)