Skip to content

Commit

Permalink
[Internal] Refactor automation test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoiriert committed Sep 29, 2024
1 parent 6aeb1f9 commit 25b48b6
Show file tree
Hide file tree
Showing 36 changed files with 512 additions and 383 deletions.
5 changes: 5 additions & 0 deletions app/src/Test/TestKernelBrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@
class TestKernelBrowser extends KernelBrowser
{
use JWTLoginTrait;

public function loginUserInAdmin(object $user): static
{
return $this->loginUser($user, 'user');
}
}
33 changes: 10 additions & 23 deletions packages/application/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<php>
<ini name="error_reporting" value="-1" />
Expand All @@ -25,19 +17,14 @@
</testsuite>
</testsuites>

<filter>
<whitelist>
<source>
<include>
<directory>.</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="./tmp/report" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
</logging>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
23 changes: 7 additions & 16 deletions packages/aws-tool-kit/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="error_reporting" value="-1" />
Expand All @@ -26,14 +17,14 @@
</testsuite>
</testsuites>

<coverage>
<source>
<include>
<directory>./src/</directory>
<directory>.</directory>
</include>
<exclude>
<directory>src/DataFixtures</directory>
<directory>src/Migrations</directory>
<directory>tests</directory>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</coverage>
</source>
</phpunit>
34 changes: 10 additions & 24 deletions packages/console/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="error_reporting" value="-1" />
Expand All @@ -26,19 +17,14 @@
</testsuite>
</testsuites>

<filter>
<whitelist>
<source>
<include>
<directory>.</directory>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="./tmp/report" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
</logging>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
25 changes: 23 additions & 2 deletions packages/core/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Main">
<testsuite name="all">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>.</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
27 changes: 24 additions & 3 deletions packages/cron-job/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Main">
<testsuite name="all">
<directory>./Tests</directory>
</testsuite>
</testsuites>
</phpunit>

<source>
<include>
<directory>.</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
25 changes: 23 additions & 2 deletions packages/dependency-injection/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Main">
<testsuite name="all">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>.</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
25 changes: 23 additions & 2 deletions packages/doctrine-extra/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Main">
<testsuite name="all">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>.</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
25 changes: 23 additions & 2 deletions packages/entity-migrator/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Main">
<testsuite name="all">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>.</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
25 changes: 23 additions & 2 deletions packages/fixer/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
</php>

<testsuites>
<testsuite name="Main">
<testsuite name="all">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>.</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./Tests</directory>
<directory>./Resources</directory>
</exclude>
</source>
</phpunit>
Loading

0 comments on commit 25b48b6

Please sign in to comment.