twiggy99999's avatar

Using the Laravel test suite outside of Laravel

I have inherited a super legacy project that unfortunately I can't convert to Laravel due to time/budget constraints. It has zero tests so I've started adding in Unit tests using PHPUnit.

However, when it comes to acceptance/integration tests I'm wondering what the best approach would be? Most online guides for generic PHP push towards setting up a Selenium server but AFAIK Laravel doesn't use Selenium.

So my question is, has anyone managed to intergrate the Laravel acceptance testing outside of Laravel? I'd like to avoid the hassle of setting up Selenium and would also like access to things Laravel provides like $this->get('/'); if possible.

0 likes
5 replies
Nakov's avatar

@twiggy99999 well, those are part of the Illuminate\Foundation which is the core of the framework, so just helpers on top of PHPUnit, I don't think you can use them within another project. But maybe someone else has a better answer, sorry :)

jlrdw's avatar

As popular as testing has become, I would figure that Legacy application has been working real World for some time it's thoroughly tested and works.

Kind of like an aircraft you can test and test and test but it's not good until a test pilot actually flies that thing.

twiggy99999's avatar

For anyone reading this thread in the future, it seems a good solution is codeception.

1 like

Please or to participate in this conversation.