S
S
Stanislav2022-01-10 19:53:10
PHPUnit
Stanislav, 2022-01-10 19:53:10

How to test Laravel 5 components with PhpUnit 9 using orchestra/testbench or similar package?

For the convenience of testing Laravel, there is an orchestra/testbench package that allows you to check the part of the package functionality responsible for its operation within the framework itself in the modules (plugins? Not sure how it is called correctly) of the framework, designed as separate packages. For example, simulate loading an application, get the package under test as a dependency, and then perform its integration or functional testing.

The problem is that each version of orchestral/testbench is hardcoded to a specific version of Laravel and PHPUnit. For example, if our application uses Laravel 5, then we are limited to orchestral/testbench:3.xx, which in turn is limited to PHPUnit 5.

Question: Are there any workarounds or alternatives where we can test Laravel 5 packages using orchestral/testbench (or a similar solution), as well as the Laravel 5 application itself, along with a fairly modern (better, if of course the latest ) version of PHPUnit?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2022-01-10
@lamo4ok

Well, you can fork and manually implement compatibility with the desired version. It is clear that for the ancient incarnations of the framework, no one does this on an industrial scale.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question