Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit Problems with multiple Domains #100

Open
christoph-werker opened this issue Jul 16, 2023 · 2 comments
Open

PHPUnit Problems with multiple Domains #100

christoph-werker opened this issue Jul 16, 2023 · 2 comments

Comments

@christoph-werker
Copy link

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.

@netrufo
Copy link

netrufo commented Jan 24, 2024

Aun no han solucionado ese problema yo me encuentro igual
php artisan test

@MrCanan
Copy link

MrCanan commented Apr 29, 2024

Hi,
I think I have the same problem as you? ^^
#115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants