diff --git a/app/code/Magento/Checkout/etc/frontend/di.xml b/app/code/Magento/Checkout/etc/frontend/di.xml
index 49cd31bd0d92a..889689e6c0d16 100644
--- a/app/code/Magento/Checkout/etc/frontend/di.xml
+++ b/app/code/Magento/Checkout/etc/frontend/di.xml
@@ -33,6 +33,7 @@
- checkout-data
+ - cart-data
diff --git a/app/code/Magento/Customer/Model/Address/AbstractAddress.php b/app/code/Magento/Customer/Model/Address/AbstractAddress.php
index 536ceb28b3975..2ed715a774513 100644
--- a/app/code/Magento/Customer/Model/Address/AbstractAddress.php
+++ b/app/code/Magento/Customer/Model/Address/AbstractAddress.php
@@ -230,7 +230,8 @@ public function getStreetLine($number)
*/
public function getStreetFull()
{
- return $this->getData('street');
+ $street = $this->getData('street');
+ return is_array($street) ? implode("\n", $street) : $street;
}
/**
diff --git a/app/code/Magento/Customer/Model/EmailNotification.php b/app/code/Magento/Customer/Model/EmailNotification.php
index 4714a722d5c31..853d300d70b3a 100644
--- a/app/code/Magento/Customer/Model/EmailNotification.php
+++ b/app/code/Magento/Customer/Model/EmailNotification.php
@@ -60,13 +60,6 @@ class EmailNotification implements EmailNotificationInterface
self::NEW_ACCOUNT_EMAIL_CONFIRMATION => self::XML_PATH_CONFIRM_EMAIL_TEMPLATE,
];
- /**
- * Map of templates. Use for backward compatibility
- */
- const TEMPLATE_MAP = [
- self::XML_PATH_FORGOT_EMAIL_TEMPLATE => self::XML_PATH_RESET_PASSWORD_TEMPLATE
- ];
-
/**#@-*/
/**
@@ -248,7 +241,7 @@ private function sendEmailTemplate(
$storeId = null,
$email = null
) {
- $templateId = $this->getTemplateId($template, 'store', $storeId);
+ $templateId = $this->scopeConfig->getValue($template, 'store', $storeId);
if ($email === null) {
$email = $customer->getEmail();
}
@@ -384,23 +377,4 @@ public function newAccount(
$storeId
);
}
-
- /**
- * Get templateId include considering template map
- *
- * @param string $template
- * @param string $scopeType
- * @param string $storeId
- * @return string
- */
- private function getTemplateId($template, $scopeType, $storeId)
- {
- if (array_key_exists($template, self::TEMPLATE_MAP)) {
- $templateId = $this->scopeConfig->getValue(self::TEMPLATE_MAP[$template], $scopeType, $storeId);
- if ($templateId) {
- return $templateId;
- }
- }
- return $this->scopeConfig->getValue($template, $scopeType, $storeId);
- }
}
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Address/AbstractAddressTest.php b/app/code/Magento/Customer/Test/Unit/Model/Address/AbstractAddressTest.php
index bb5738d871541..b21556a3cbc61 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Address/AbstractAddressTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Address/AbstractAddressTest.php
@@ -377,4 +377,27 @@ public function validateDataProvider()
'validated' => [array_merge($data, ['country_id' => $countryId++]), true],
];
}
+
+ /**
+ * @dataProvider getStreetFullDataProvider
+ */
+ public function testGetStreetFullAlwaysReturnsString($expectedResult, $street)
+ {
+ $this->model->setData('street', $street);
+ $this->assertEquals($expectedResult, $this->model->getStreetFull());
+ }
+
+ /**
+ * @return array
+ */
+ public function getStreetFullDataProvider()
+ {
+ return [
+ [null, null],
+ ['', []],
+ ["first line\nsecond line", ['first line', 'second line']],
+ ['single line', ['single line']],
+ ['single line', 'single line'],
+ ];
+ }
}
diff --git a/app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php b/app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php
index 88bfca40b35e2..ac48e3a2dcf8f 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/EmailNotificationTest.php
@@ -545,7 +545,7 @@ public function testPasswordResetConfirmation()
$this->scopeConfigMock->expects($this->at(0))
->method('getValue')
- ->with(EmailNotification::XML_PATH_RESET_PASSWORD_TEMPLATE, ScopeInterface::SCOPE_STORE, $customerStoreId)
+ ->with(EmailNotification::XML_PATH_FORGOT_EMAIL_TEMPLATE, ScopeInterface::SCOPE_STORE, $customerStoreId)
->willReturn($templateIdentifier);
$this->scopeConfigMock->expects($this->at(1))
->method('getValue')
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml
index cb63b3549a440..a1f2d2741839b 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/packaging/popup.phtml
@@ -21,7 +21,7 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
"Magento_Ui/js/modal/modal"
], function(jQuery){
- packaging = new Packaging(= /* @escapeNotVerified */ $block->getConfigDataJson() ?>);
+ window.packaging = new Packaging(= /* @escapeNotVerified */ $block->getConfigDataJson() ?>);
packaging.changeContainerType($$('select[name=package_container]')[0]);
packaging.checkSizeAndGirthParameter(
$$('select[name=package_container]')[0],
@@ -76,6 +76,8 @@ $girthEnabled = $block->isDisplayGirthValue() && $block->isGirthAllowed() ? 1 :
}
}]
});
+ jQuery(document).trigger('packaging:inited');
+ jQuery(document).data('packagingInited', true);
});
getTemplateFile('Magento_Shipping::order/packaging/popup_content.phtml')) ?>
diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml
index fb904f1e840ad..55c782eb0fc82 100644
--- a/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/templates/view/form.phtml
@@ -70,25 +70,30 @@
= $block->getChildHtml('shipment_tracking') ?>
= $block->getChildHtml('shipment_packaging') ?>
-
+ if (jQuery(document).data('packagingInited')) {
+ setCallbacks();
+ } else {
+ jQuery(document).on('packaging:inited', setCallbacks);
+ }
+ });
+
diff --git a/dev/travis/before_script.sh b/dev/travis/before_script.sh
index 7f6ef4f91ff48..e72e01dfaccd3 100755
--- a/dev/travis/before_script.sh
+++ b/dev/travis/before_script.sh
@@ -71,7 +71,7 @@ case $TEST_SUITE in
--output-file="$changed_files_ce" \
--base-path="$TRAVIS_BUILD_DIR" \
--repo='https://github.com/magento/magento2.git' \
- --branch='develop'
+ --branch='$TRAVIS_BRANCH'
cat "$changed_files_ce" | sed 's/^/ + including /'
cd ../../..