bootstrap = Bootstrap::getInstance(); $this->bootstrap->loadArea(Area::AREA_ADMINHTML); $this->objectManager = Bootstrap::getObjectManager(); $this->container = $this->objectManager->create(Container::class); } /** * @covers \Magento\Payment\Block\Form\Container::getMethods * @magentoDataFixture Magento/Braintree/_files/paypal_quote.php */ public function testGetMethods() { $customerId = 1; /** @var CartRepositoryInterface $quoteRepository */ $quoteRepository = $this->objectManager->get(CartRepositoryInterface::class); $quote = $quoteRepository->getForCustomer($customerId); $this->container->setData('quote', $quote); $actual = $this->container->getMethods(); /** @var MethodInterface $paymentMethod */ foreach ($actual as $paymentMethod) { static::assertNotContains($paymentMethod->getCode(), [ PayPalConfigProvider::PAYPAL_VAULT_CODE, PayPalConfigProvider::PAYPAL_CODE ]); } } }