S
S
SteepZero2018-04-24 16:09:38
Unit testing
SteepZero, 2018-04-24 16:09:38

How to specify a custom directory for loading tests in Laravel?

I pack my module in Laravel into a separate namespace It is
very convenient that in the ServiceProvider in the boot() method
You can specify custom directories for views and migrations
(via the $this->loadMigrationsFrom() and $this->loadViewsFrom() methods)
But I can’t understand how can I specify a custom directory for loading tests

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2018-04-24
@SteepZero

phpunit.xml

<testsuite name="Unit">
    <directory suffix="Test.php">./tests/Unit</directory>
</testsuite>

You can set any paths, any number of testsuites and even wildcards in the paths are allowed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question