Using DocBlock Annotations
DocBlock annotations help to declare context in your code. In addition to built-in PHPUnit annotations, the Integration testing framework provides custom annotations described in this topic.
The following annotations are available in integration tests:
||Enables or disables application isolation when you run tests. When enabled, an application state after a test run will be the same as before the test run. For example, you should enable it, when you want to create sessions in a test, but you don’t want them to affect other tests.|
||Sets up configuration settings for a particular test. The list of settings is stored in the
||Enables or disables database isolation. Disabled by default, unless you are using
||Points to a class or a method which creates testing entities (fixtures) for test execution.|
||Configures test environment in the context of specified application area.|
||Enables or disables certain cache segment or all of them to prevent isolation problems.|
||Registers fixture components from specified directory (recursively). Unregisters the components after the test is finished.|
The Magento-specific annotations for integration tests are applied in the following order:
This order is necessary to meet the requirement of setting up the store-scoped configuration values for fixture stores (stores that are created by data fixtures).