Skip to content

Commit 447197e

Browse files
authored
Merge pull request #129 from convenient/integration-tests
Attempt to use phpunit 10 compatible event system
2 parents d478d6a + 995ba4f commit 447197e

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
4+
colors="true"
5+
columns="max"
6+
beStrictAboutTestsThatDoNotTestAnything="false"
7+
bootstrap="./framework/bootstrap.php"
8+
stderr="true">
9+
<source>
10+
<exclude>
11+
<directory>../../../app/code/*/*/Test</directory>
12+
<directory>../../../lib/internal/*/*/Test</directory>
13+
<directory>../../../lib/internal/*/*/*/Test</directory>
14+
<directory>../../../setup/src/*/*/Test</directory>
15+
</exclude>
16+
</source>
17+
<!-- Test suites definition -->
18+
<testsuites>
19+
<testsuite name="IntegrationTests">
20+
<directory suffix="Test.php">../../../vendor/%COMPOSER_NAME%/Test/Integration</directory>
21+
<directory suffix="Test.php">../../../vendor/%COMPOSER_NAME%/tests/Integration</directory>
22+
<directory suffix="Test.php">../../../vendor/%COMPOSER_NAME%/tests/integration</directory>
23+
<directory suffix="Test.php">../../../vendor/%COMPOSER_NAME%/src/Test/Integration</directory>
24+
<directory suffix="Test.php">../../../vendor/%COMPOSER_NAME%/src/tests/Integration</directory>
25+
<directory suffix="Test.php">../../../vendor/%COMPOSER_NAME%/src/tests/integration</directory>
26+
</testsuite>
27+
</testsuites>
28+
<!-- Code coverage filters -->
29+
<!-- PHP INI settings and constants definition -->
30+
<php>
31+
<includePath>.</includePath>
32+
<includePath>testsuite</includePath>
33+
<ini name="date.timezone" value="America/Los_Angeles"/>
34+
<ini name="xdebug.max_nesting_level" value="200"/>
35+
<ini name="memory_limit" value="-1"/>
36+
<!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
37+
<const name="TESTS_INSTALL_CONFIG_FILE" value="etc/install-config-mysql.php"/>
38+
<!-- Local XML post installation configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
39+
<const name="TESTS_POST_INSTALL_SETUP_COMMAND_CONFIG_FILE" value="etc/post-install-setup-command-config.php"/>
40+
<!-- Local XML configuration file ('.dist' extension will be added, if the specified file doesn't exist) -->
41+
<const name="TESTS_GLOBAL_CONFIG_FILE" value="etc/config-global.php"/>
42+
<!-- Semicolon-separated 'glob' patterns, that match global XML configuration files -->
43+
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
44+
<!-- Whether to cleanup the application before running tests or not -->
45+
<const name="TESTS_CLEANUP" value="enabled"/>
46+
<!-- Memory usage and estimated leaks thresholds -->
47+
<!--<const name="TESTS_MEM_USAGE_LIMIT" value="1024M"/>-->
48+
<const name="TESTS_MEM_LEAK_LIMIT" value=""/>
49+
<!-- Path to Percona Toolkit bin directory -->
50+
<!--<const name="PERCONA_TOOLKIT_BIN_DIR" value=""/>-->
51+
<!-- CSV Profiler Output file -->
52+
<!--<const name="TESTS_PROFILER_FILE" value="profiler.csv"/>-->
53+
<!-- Bamboo compatible CSV Profiler Output file name -->
54+
<!--<const name="TESTS_BAMBOO_PROFILER_FILE" value="profiler.csv"/>-->
55+
<!-- Metrics for Bamboo Profiler Output in PHP file that returns array -->
56+
<!--<const name="TESTS_BAMBOO_PROFILER_METRICS_FILE" value="../../build/profiler_metrics.php"/>-->
57+
<!-- Whether to output all CLI commands executed by the bootstrap and tests -->
58+
<const name="TESTS_EXTRA_VERBOSE_LOG" value="1"/>
59+
<!-- Magento mode for tests execution. Possible values are "default", "developer" and "production". -->
60+
<const name="TESTS_MAGENTO_MODE" value="developer"/>
61+
<!-- Minimum error log level to listen for. Possible values: -1 ignore all errors, and level constants form http://tools.ietf.org/html/rfc5424 standard -->
62+
<const name="TESTS_ERROR_LOG_LISTENER_LEVEL" value="-1"/>
63+
<!-- Connection parameters for MongoDB library tests -->
64+
<!--<const name="MONGODB_CONNECTION_STRING" value="mongodb://localhost:27017"/>-->
65+
<!--<const name="MONGODB_DATABASE_NAME" value="magento_integration_tests"/>-->
66+
<!-- Connection parameters for RabbitMQ tests -->
67+
<!--<const name="RABBITMQ_MANAGEMENT_PROTOCOL" value="https"/>-->
68+
<!--<const name="RABBITMQ_MANAGEMENT_PORT" value="15672"/>-->
69+
<!--<const name="RABBITMQ_VIRTUALHOST" value="/"/>-->
70+
<!--<const name="TESTS_PARALLEL_RUN" value="1"/>-->
71+
<const name="USE_OVERRIDE_CONFIG" value="enabled"/>
72+
</php>
73+
<extensions>
74+
<bootstrap class="Qameta\Allure\PHPUnit\AllureExtension">
75+
<!-- Path to config file (default is config/allure.config.php) -->
76+
<parameter name="config" value="allure/allure.config.php" />
77+
</bootstrap>
78+
<bootstrap class="Magento\TestFramework\Event\Subscribers"/>
79+
</extensions>
80+
</phpunit>

magento-integration-tests/entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ if [[ ! -z "$PHPUNIT_FILE" ]] ; then
131131
fi
132132

133133
if [[ ! -f "$PHPUNIT_FILE" ]] ; then
134-
PHPUNIT_FILE=/docker-files/phpunit.xml
134+
if [[ "$MAGENTO_VERSION" == 2.4.8* ]]; then
135+
PHPUNIT_FILE=/docker-files/phpunitv10.xml
136+
else
137+
PHPUNIT_FILE=/docker-files/phpunit.xml
138+
fi
135139
fi
136140
echo "Using PHPUnit file: $PHPUNIT_FILE"
137141

0 commit comments

Comments
 (0)