17 use PHPUnit\Framework\TestCase;
27 private $objectManager;
41 $option = $this->invokeTestInstantPurchaseOptionCalculation();
43 $this->assertTrue(
$option->isAvailable());
44 $this->assertInstanceOf(PaymentTokenInterface::class,
$option->getPaymentToken());
45 $this->assertInstanceOf(Address::class,
$option->getShippingAddress());
46 $this->assertInstanceOf(Address::class,
$option->getBillingAddress());
47 $this->assertInstanceOf(ShippingMethodInterface::class,
$option->getShippingMethod());
56 $option = $this->invokeTestInstantPurchaseOptionCalculation();
57 $this->assertFalse(
$option->isAvailable());
68 $option = $this->invokeTestInstantPurchaseOptionCalculation();
69 $this->assertFalse(
$option->isAvailable());
80 $option = $this->invokeTestInstantPurchaseOptionCalculation();
81 $this->assertFalse(
$option->isAvailable());
90 $option = $this->invokeTestInstantPurchaseOptionCalculation();
91 $this->assertFalse(
$option->isAvailable());
102 $option = $this->invokeTestInstantPurchaseOptionCalculation();
103 $this->assertFalse(
$option->isAvailable());
114 $option = $this->invokeTestInstantPurchaseOptionCalculation();
115 $this->assertFalse(
$option->isAvailable());
126 $option = $this->invokeTestInstantPurchaseOptionCalculation();
127 $this->assertFalse(
$option->isAvailable());
138 $instantPurchase = $this->objectManager->create(InstantPurchaseInterface::class);
139 $store = $this->getFixtureStore();
150 private function getFixtureStore(): Store
152 $repository = $this->objectManager->create(StoreRepositoryInterface::class);
162 private function getFixtureCustomer(): Customer
164 $repository = $this->objectManager->create(CustomerRepositoryInterface::class);
166 $customer = $this->objectManager->create(Customer::class);
testNotAvailableWithoutPaymentToken()
testNotAvailableWhenVaultNotActive()
testNotAvailableWhenSupportSwitchedOffForVault()
testAvailableWhenEverythingSetUp()
testNotAvailableWhenVaultProviderNotActive()
testNotAvailableWithoutAddresses()
testNotAvailableWhenDisabledInConfig()
static getObjectManager()
testNotAvailableWhenShippingMethodsDisabled()