Download the PHP package yireo/shopware6-integration-test-helper without Composer
On this page you can find all versions of the php package yireo/shopware6-integration-test-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yireo/shopware6-integration-test-helper
More information about yireo/shopware6-integration-test-helper
Files in yireo/shopware6-integration-test-helper
Package shopware6-integration-test-helper
Short Description Utilities to help you test your Shopware plugins
License MIT
Informations about the package shopware6-integration-test-helper
YireoIntegrationTestHelper
Shopware 6 plugin and library to help you build PHPUnit-based integration tests easier
Features
- Custom PHPUnit bootstrap
- Support for various environment variables
- Various PHP traits
assertBundleIsInstalled(string $bundleName)
assertServiceExists(string $serviceId)
assertEntityExtensionExists(string $entityExtensionClass)
- PHP class
\Yireo\IntegrationTestHelper\Test\Integration\AbstractTestCase
- Includes all PHP traits already
Installation
Install this plugin and activate it:
PHPUnit configuration
Next, configure your PHPUnit file to use the file vendor/yireo/shopware6-integration-test-helper/src/test_bootstrap.php
as a bootstrap. Also configure the DATABASE_URL
(pointing to a different database than your regular Shopware database).
An example PHPUnit file is here:
Instead of using the PHPUnit file for this, you could also add the environment variables to a file .env.test
instead.
- When
FORCE_INSTALL
is1
, Shopware will do a reinstallation; - When
FORCE_INSTALL_PLUGINS
is1
, plugins will be refreshed, installed and activated; - When
FORCE_INSTALL_ADDITIONAL_PLUGINS
contains a comma-separate list of plugins, each plugin will be installed and activated. Make sure to include at least your own plugin (in this exampleYireoExample
);