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

Documented the config-global.php file purpose #9109

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/guides/v2.4/test/integration/integration_test_execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,33 @@ Leave all the settings that do not start with `db-` and `amqp-` at their default
You can include additional setup options—available to the `setup:install` command—in the test configuration file. A
complete list of options is available [here]({{ page.baseurl }}/install-gde/install/cli/install-cli.html).

If your project requires custom entries in the `core_config_data` table, such as the introduction of new 3rd party services
that affect your application on a basic level or configuration for logic that would prevent access if not configured
properly, Magento provides a file template for this purpose.

Copy `dev/tests/integration/etc/config-global.php.dist` to `dev/tests/integration/etc/config-global.php` (without the
`.dist` suffix) and add your path-value pairs there. Do not remove existing entries from the file as they are required
for the Integration Test Framework to run tests properly.

Example:

```php
return [
'customer/password/limit_password_reset_requests_method' => 0,
'admin/security/admin_account_sharing' => 1,
'admin/security/limit_password_reset_requests_method' => 0,
'some/custom/path' => 'some-custom-value'
];
```

Note that the file above is only for configuration files required by all integration tests. If you need to introduce
new configuration values for particular tests to perform their function, use the
[@magentoConfigFixture]({{ page.baseurl }}/test/integration/annotations/magento-config-fixture.html) annotation instead.

{:.bs-callout-info}
You can change the locations and names of both files used by the Integration Test Framework that were described
above using the PHPUnit configuration file.

## Adjust the PHPUnit configuration file

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