Ejemplo n.º 1
0
 /**
  *
  */
 public function testIsAllowedGuestCheckoutConfigSetToFalse()
 {
     $this->resultMock->expects($this->once())->method('setIsAllowed')->with(true);
     $this->eventMock->expects($this->once())->method('getStore')->will($this->returnValue($this->storeMock));
     $this->eventMock->expects($this->once())->method('getResult')->will($this->returnValue($this->resultMock));
     $this->scopeConfig->expects($this->once())->method('isSetFlag')->with(Observer::XML_PATH_DISABLE_GUEST_CHECKOUT, ScopeInterface::SCOPE_STORE, $this->storeMock)->willReturn(false);
     $this->observerMock->expects($this->exactly(2))->method('getEvent')->will($this->returnValue($this->eventMock));
     $this->assertInstanceOf('\\Magento\\Downloadable\\Model\\Observer', $this->observer->isAllowedGuestCheckout($this->observerMock));
 }