Closed sjokkateer closed 3 years ago
Hello, I initially covered the implementation of the MiddlewareAwareTrait through different setups of the Router class. This would have provided some context on when one or the other branch of the resolveMiddleware would be executed in practice. However, this tightly couples the test to the underlying implementation of the trait which did not feel right.
Because of that I moved to a different approach, testing the trait's functionality directly. This does however make me forward method calls to the trait, if that defeats the purpose of a clean test, or if these tests are too trivial then please don't mind this PR.
Thanks @sjokkateer - feel free to increase coverage in other areas too if you like, I'll never be against that
Adds two tests that cover two missing branches of the resolveMiddleware method.