laravel-multidomain
laravel-multidomain copied to clipboard
PHPUnit Problems with multiple Domains
Hello all,
somehow I do not get on at the moment. Maybe it just does not work, or I have overlooked something.
In my project I have several domains and would like to test them with unittests.
Unfortunately, I do not yet manage to save the configuration for multiple domains correctly.
In my PHPUnit I use my ENV variables
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
colors="true"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="DOMAIN1">
<directory suffix="Test.php">./tests/DOMAIN1</directory>
</testsuite>
<testsuite name="DOMAIN2">
<directory suffix="Test.php">./tests/DOMAIN2</directory>
</testsuite>
</testsuites>
<php>
<ini name="memory_limit" value="512M"/>
<env name="PROJECT" value="ABC"/> <-- This one i have to change e.g.
</php>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
</phpunit>
It would be desirable if I could simply set a new configuration per test-suite....
Unfortunately, I get me Googlen no longer further. Maybe someone has a "best practice" solution.
Aun no han solucionado ese problema yo me encuentro igual php artisan test
Hi, I think I have the same problem as you? ^^ https://github.com/gecche/laravel-multidomain/issues/115