コード例 #1
0
 public function testGet()
 {
     $messageId = 156;
     $this->quoteMock->expects($this->once())->method('getGiftMessageId')->will($this->returnValue($messageId));
     $this->messageFactoryMock->expects($this->once())->method('create')->will($this->returnValue($this->messageMock));
     $this->messageMock->expects($this->once())->method('load')->will($this->returnValue($this->messageMock));
     $this->assertEquals($this->messageMock, $this->cartRepository->get($this->cartId));
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function get($cartId)
 {
     /** @var $quoteIdMask QuoteIdMask */
     $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
     return $this->repository->get($quoteIdMask->getQuoteId());
 }