diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
index a5f8db141716f..4c8e105f7cdce 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml
@@ -45,6 +45,7 @@
-
+
getChildHtml('checkout.cart.order.actions') ?>
diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml
index e0aa120c9c63e..3c2b1acc598d0 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml
@@ -93,6 +93,7 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
@@ -61,7 +61,7 @@
-
+
|
@@ -76,7 +76,7 @@
diff --git a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
index f3c949969be87..b2e5333c515e3 100644
--- a/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
+++ b/app/code/Magento/Newsletter/Model/Resource/Subscriber/Collection.php
@@ -146,7 +146,7 @@ public function showCustomerInfo()
[
'customer' => $this->getTable('customer_entity')
],
- 'main_table.customer_id',
+ 'main_table.customer_id = customer.entity_id',
[
'customer_lastname' => 'lastname',
'customer_firstname' => 'firstname'
diff --git a/setup/src/Magento/Setup/Test/Unit/Controller/InstallTest.php b/setup/src/Magento/Setup/Test/Unit/Controller/InstallTest.php
index af04feacb0de1..d7b9871d41ef3 100644
--- a/setup/src/Magento/Setup/Test/Unit/Controller/InstallTest.php
+++ b/setup/src/Magento/Setup/Test/Unit/Controller/InstallTest.php
@@ -62,7 +62,16 @@ public function testStartAction()
$this->assertTrue($variables['success']);
}
- public function testStartActionWithError()
+ public function testStartActionException()
+ {
+ $this->webLogger->expects($this->once())->method('clear');
+ $this->installer->expects($this->once())->method('install')
+ ->willThrowException($this->getMock('\Magento\Setup\SampleDataException'));
+ $jsonModel = $this->controller->startAction();
+ $this->assertTrue($jsonModel->getVariable('isSampleDataError'));
+ }
+
+ public function testStartActionWithSampleDataError()
{
$this->webLogger->expects($this->once())->method('clear');
$this->webLogger->expects($this->once())->method('logError');
@@ -108,6 +117,19 @@ public function testProgressActionWithError()
$this->assertStringStartsWith('exception \'LogicException\' with message \'' . $e, $variables['console'][0]);
}
+ public function testProgressActionWithSampleDataError()
+ {
+ $this->progressFactory->expects($this->once())->method('createFromLog')
+ ->willThrowException($this->getMock('\Magento\Setup\SampleDataException'));
+ $jsonModel = $this->controller->progressAction();
+ $this->assertInstanceOf('\Zend\View\Model\JsonModel', $jsonModel);
+ $variables = $jsonModel->getVariables();
+ $this->assertArrayHasKey('success', $variables);
+ $this->assertArrayHasKey('console', $variables);
+ $this->assertFalse($variables['success']);
+ $this->assertTrue($jsonModel->getVariable('isSampleDataError'));
+ }
+
public function testDispatch()
{
$request = $this->getMock('\Zend\Http\PhpEnvironment\Request', [], [], '', false);
diff --git a/setup/src/Magento/Setup/Test/Unit/Model/SampleDataTest.php b/setup/src/Magento/Setup/Test/Unit/Model/SampleDataTest.php
new file mode 100644
index 0000000000000..58c35cc933a9b
--- /dev/null
+++ b/setup/src/Magento/Setup/Test/Unit/Model/SampleDataTest.php
@@ -0,0 +1,52 @@
+loggerInterface = $this->getMock('Magento\Framework\Setup\LoggerInterface');
+ $this->directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false);
+ $this->sampleDataInstall = new SampleData($this->directoryList);
+ }
+
+ public function testIsDeployed()
+ {
+ $this->directoryList->expects($this->once())->method('getPath')->with('code');
+ $this->sampleDataInstall->isDeployed();
+ }
+
+ /**
+ * Test SampleData installation check method.
+ * Can be tested only negative case because file_exists method used in the tested class
+ */
+ public function testIsInstalledSuccessfully()
+ {
+ $this->assertFalse($this->sampleDataInstall->isInstalledSuccessfully());
+ }
+}