public function testIsGuestCheckoutAllowed() { $quoteMock = $this->getMock('\\Magento\\Quote\\Model\\Quote', [], [], '', false); $this->checkoutSessionMock->expects($this->once())->method('getQuote')->willReturn($quoteMock); $this->checkoutHelperMock->expects($this->once())->method('isAllowedGuestCheckout')->with($quoteMock)->willReturn(true); $this->assertTrue($this->model->isGuestCheckoutAllowed()); }
/** * {@inheritdoc} */ public function isGuestCheckoutAllowed() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'isGuestCheckoutAllowed'); if (!$pluginInfo) { return parent::isGuestCheckoutAllowed(); } else { return $this->___callPlugins('isGuestCheckoutAllowed', func_get_args(), $pluginInfo); } }