Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 /**
  * {@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);
     }
 }