getHandlerFromConfig example


#[Package('merchant-services')] class StoreClientFactoryTest extends TestCase
{
    public function testCreatesClientWithoutMiddlewares(): void
    {
        $factory = new StoreClientFactory($this->createSystemConfigService());

        $client = $factory->create();
        $config = $this->getConfigFromClient($client);
        $handler = $this->getHandlerFromConfig($config);

        static::assertTrue($handler->hasHandler());
    }

    public function testCreatesClientWithMiddlewares(): void
    {
        $factory = new StoreClientFactory($this->createSystemConfigService());

        $client = $factory->create([$this->createMock(VerifyResponseSignatureMiddleware::class)]);
        $config = $this->getConfigFromClient($client);
        $handler = $this->getHandlerFromConfig($config);

        
Home | Imprint | This part of the site doesn't use cookies.