Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 4422164

Browse files
authored
Merge pull request #9109 from #9109
[Imported] Documented the config-global.php file purpose
2 parents 21b26aa + eb0da19 commit 4422164

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/guides/v2.4/test/integration/integration_test_execution.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,33 @@ Leave all the settings that do not start with `db-` and `amqp-` at their default
9999
You can include additional setup options—available to the `setup:install` command—in the test configuration file. A
100100
complete list of options is available [here]({{ page.baseurl }}/install-gde/install/cli/install-cli.html).
101101

102+
If your project requires custom entries in the `core_config_data` table, such as the introduction of new 3rd party services
103+
that affect your application on a basic level or configuration for logic that would prevent access if not configured
104+
properly, Magento provides a file template for this purpose.
105+
106+
Copy `dev/tests/integration/etc/config-global.php.dist` to `dev/tests/integration/etc/config-global.php` (without the
107+
`.dist` suffix) and add your path-value pairs there. Do not remove existing entries from the file as they are required
108+
for the Integration Test Framework to run tests properly.
109+
110+
Example:
111+
112+
```php
113+
return [
114+
'customer/password/limit_password_reset_requests_method' => 0,
115+
'admin/security/admin_account_sharing' => 1,
116+
'admin/security/limit_password_reset_requests_method' => 0,
117+
'some/custom/path' => 'some-custom-value'
118+
];
119+
```
120+
121+
Note that the file above is only for configuration files required by all integration tests. If you need to introduce
122+
new configuration values for particular tests to perform their function, use the
123+
[@magentoConfigFixture]({{ page.baseurl }}/test/integration/annotations/magento-config-fixture.html) annotation instead.
124+
125+
{:.bs-callout-info}
126+
You can change the locations and names of both files used by the Integration Test Framework that were described
127+
above using the PHPUnit configuration file.
128+
102129
## Adjust the PHPUnit configuration file
103130

104131
See the `dev/tests/integration/phpunit.xml.dist` file for the default integration test configuration.

0 commit comments

Comments
 (0)