10 use PHPUnit\Framework\TestCase;
21 private $objectManager;
33 public function testDefaultFormatterIsAppliedWhenBasicIntegration()
36 $customerSession = $this->objectManager->get(Session::class);
37 $customerSession->loginById(1);
40 $customerDataSectionSource = $this->objectManager->get(InstantPurchase::class);
41 $data = $customerDataSectionSource->getSectionData();
43 'Fake Payment Method Vault',
44 $data[
'paymentToken'][
'summary'],
45 'Basic implementation returns provider title.' 55 public function testCustomFormatterIsAppliedWhenComplexIntegration()
57 $this->objectManager->configure([
59 'type' => StubPaymentTokenFormatter::class,
63 $customerSession = $this->objectManager->get(Session::class);
64 $customerSession->loginById(1);
67 $customerDataSectionSource = $this->objectManager->get(InstantPurchase::class);
68 $data = $customerDataSectionSource->getSectionData();
71 $data[
'paymentToken'][
'summary'],
72 'Complex implementation returns custom string.'
static getObjectManager()