Skip to content

Commit

Permalink
Remove leftovers of paypal express checkout in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMilek committed Sep 18, 2024
1 parent 02991f7 commit ae9805c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ public function it_loads_gateway_config_validation_groups_parameter_value_proper
$this->load([
'gateway_config' => [
'validation_groups' => [
'paypal_express_checkout' => ['sylius', 'paypal'],
'paypal' => ['sylius', 'paypal'],
'offline' => ['sylius'],
],
],
]);

$this->assertContainerBuilderHasParameter('sylius.payum.gateway_config.validation_groups', ['paypal_express_checkout' => ['sylius', 'paypal'], 'offline' => ['sylius']]);
$this->assertContainerBuilderHasParameter('sylius.payum.gateway_config.validation_groups', ['paypal' => ['sylius', 'paypal'], 'offline' => ['sylius']]);
}

protected function getContainerExtensions(): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function let(
ExecutionContextInterface $executionContext,
): void {
$this->beConstructedWith(
['paypal_express_checkout' => 'sylius.payum_gateway_factory.paypal_express_checkout', 'stripe_checkout' => 'sylius.payum_gateway_factory.stripe_checkout'],
['paypal' => 'sylius.payum_gateway_factory.paypal', 'stripe_checkout' => 'sylius.payum_gateway_factory.stripe_checkout'],
);

$this->initialize($executionContext);
Expand Down Expand Up @@ -60,6 +60,6 @@ function it_does_not_add_violation_to_gateway_configuration_with_correct_name(
): void {
$executionContext->buildViolation(Argument::cetera())->shouldNotBeCalled();

$this->validate('paypal_express_checkout', new GatewayFactoryExists());
$this->validate('paypal', new GatewayFactoryExists());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class GatewayConfigGroupsGeneratorSpec extends ObjectBehavior
function let(): void
{
$this->beConstructedWith([
'paypal_express_checkout' => ['paypal_express_checkout', 'sylius'],
'paypal' => ['paypal', 'sylius'],
'stripe_checkout' => ['stripe_checkout', 'sylius'],
]);
}
Expand All @@ -41,9 +41,9 @@ function it_returns_gateway_config_validation_groups(
PaymentMethodInterface $paymentMethod,
): void {
$paymentMethod->getGatewayConfig()->willReturn($gatewayConfig);
$gatewayConfig->getFactoryName()->willReturn('paypal_express_checkout');
$gatewayConfig->getFactoryName()->willReturn('paypal');

$this($paymentMethod)->shouldReturn(['paypal_express_checkout', 'sylius']);
$this($paymentMethod)->shouldReturn(['paypal', 'sylius']);
}

function it_returns_default_validation_groups_if_gateway_config_is_null(
Expand All @@ -61,8 +61,8 @@ function it_returns_gateway_config_validation_groups_if_it_is_payment_method_for
): void {
$form->getData()->willReturn($paymentMethod);
$paymentMethod->getGatewayConfig()->willReturn($gatewayConfig);
$gatewayConfig->getFactoryName()->willReturn('paypal_express_checkout');
$gatewayConfig->getFactoryName()->willReturn('paypal');

$this($form)->shouldReturn(['paypal_express_checkout', 'sylius']);
$this($form)->shouldReturn(['paypal', 'sylius']);
}
}

0 comments on commit ae9805c

Please sign in to comment.