Indexer dimension mode
Overview
Sets the indexer dimension mode for the test run.
Format
Copied to your clipboard#[IndexerDimensionMode(string $indexer, string $dimension)]
Parameters
- indexer
- The name of the indexer code.
- dimension
- The name of the dimension mode.
Principles
- You can use more than one attribute for a test case or a test method.
- Multiple attributes are applied in the given order.
- Attributes from different scopes are not merged.
- A test method attribute completely overrides a test class attribute.
Test class attribute
An IndexerDimensionMode
attribute at the test case level is applied to all tests.
Test method attribute
An IndexerDimensionMode
attribute at the test method level configures the test method only.
It completely overrides the attribute specified for the test class.
Example
Copied to your clipboard#[DbIsolation(false),IndexerDimensionMode('catalog_product_price', 'website_and_customer_group')]class FixedBundlePriceCalculatorWithDimensionTest extends \PHPUnit\Framework\TestCase{public function testPriceForFixedBundle(array $strategyModifiers, array $expectedResults){}}