Beispiel #1
0
 /**
  * @magentoAppIsolation enabled
  * @magentoDbIsolation enabled
  * @magentoDataFixture Magento/Customer/_files/customer.php
  */
 public function testGetCustomerCartNewCart()
 {
     $customerIdFromFixture = 1;
     $customerEmailFromFixture = '*****@*****.**';
     /** Preconditions */
     /** @var \Magento\Backend\Model\Session\Quote $session */
     $session = Bootstrap::getObjectManager()->create('Magento\\Backend\\Model\\Session\\Quote');
     $session->setCustomerId($customerIdFromFixture);
     /** SUT execution */
     $customerQuote = $this->_model->getCustomerCart();
     $this->assertNotEmpty($customerQuote->getId(), 'Quote ID is invalid.');
     $this->assertEquals($customerEmailFromFixture, $customerQuote->getCustomerEmail(), 'Customer data is preserved incorrectly in a newly quote.');
 }