'domain' => 'test.limit',
'interval' => '10 seconds',
],
],
],
],
];
$container =
new ContainerBuilder(new ParameterBag($config));
$container->
register(RateLimiter::
class);
$rateLimiterCompilerPass =
new RateLimiterCompilerPass();
$rateLimiterCompilerPass->
process($container);
$this->rateLimiterDef =
$container->
getDefinition('shopware.rate_limiter'
);
} public function testSystemServiceConfigReference(): void
{ static::
assertEquals('registerLimiterFactory',
$this->rateLimiterDef->
getMethodCalls()[0
][0
]);
$registerLimiterFactoryCall =
$this->rateLimiterDef->
getMethodCalls()[0
][1
];
static::
assertEquals('cart_add_line_item',
$registerLimiterFactoryCall[0
]);