From 756cefa0b7ff6bc687866809b3f3e25c12943d92 Mon Sep 17 00:00:00 2001
From: "rostyslav.hymon"
Date: Wed, 30 Jan 2019 12:11:31 +0000
Subject: [PATCH 1/8] MAGETWO-97630: [Magento Cloud] news_from_date and
news_to_date dates incorrect in database with scheduled updates
Due to unstable work of intl parsing on different platforms
---
app/code/Magento/Cron/Model/Schedule.php | 30 ++--
.../Cron/Test/Unit/Model/ScheduleTest.php | 140 ++++++++++++++----
2 files changed, 136 insertions(+), 34 deletions(-)
diff --git a/app/code/Magento/Cron/Model/Schedule.php b/app/code/Magento/Cron/Model/Schedule.php
index 39a58ef360cb3..a9ae04cb0c5d1 100644
--- a/app/code/Magento/Cron/Model/Schedule.php
+++ b/app/code/Magento/Cron/Model/Schedule.php
@@ -9,6 +9,7 @@
use Magento\Framework\Exception\CronException;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
+use Magento\Framework\Intl\DateTimeFactory;
/**
* Crontab schedule model
@@ -50,13 +51,19 @@ class Schedule extends \Magento\Framework\Model\AbstractModel
*/
private $timezoneConverter;
+ /**
+ * @var DateTimeFactory
+ */
+ private $dateTimeFactory;
+
/**
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
* @param array $data
- * @param TimezoneInterface $timezoneConverter
+ * @param TimezoneInterface|null $timezoneConverter
+ * @param DateTimeFactory|null $dateTimeFactory
*/
public function __construct(
\Magento\Framework\Model\Context $context,
@@ -64,10 +71,12 @@ public function __construct(
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
array $data = [],
- TimezoneInterface $timezoneConverter = null
+ TimezoneInterface $timezoneConverter = null,
+ DateTimeFactory $dateTimeFactory = null
) {
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
$this->timezoneConverter = $timezoneConverter ?: ObjectManager::getInstance()->get(TimezoneInterface::class);
+ $this->dateTimeFactory = $dateTimeFactory ?: ObjectManager::getInstance()->get(DateTimeFactory::class);
}
/**
@@ -109,17 +118,20 @@ public function trySchedule()
if (!$e || !$time) {
return false;
}
+ $configTimeZone = $this->timezoneConverter->getConfigTimezone();
+ $storeDateTime = $this->dateTimeFactory->create(null, new \DateTimeZone($configTimeZone));
if (!is_numeric($time)) {
//convert time from UTC to admin store timezone
//we assume that all schedules in configuration (crontab.xml and DB tables) are in admin store timezone
- $time = $this->timezoneConverter->date($time)->format('Y-m-d H:i');
- $time = strtotime($time);
+ $dateTimeUtc = $this->dateTimeFactory->create($time);
+ $time = $dateTimeUtc->getTimestamp();
}
- $match = $this->matchCronExpression($e[0], strftime('%M', $time))
- && $this->matchCronExpression($e[1], strftime('%H', $time))
- && $this->matchCronExpression($e[2], strftime('%d', $time))
- && $this->matchCronExpression($e[3], strftime('%m', $time))
- && $this->matchCronExpression($e[4], strftime('%w', $time));
+ $time = $storeDateTime->setTimestamp($time);
+ $match = $this->matchCronExpression($e[0], $time->format('i'))
+ && $this->matchCronExpression($e[1], $time->format('H'))
+ && $this->matchCronExpression($e[2], $time->format('d'))
+ && $this->matchCronExpression($e[3], $time->format('m'))
+ && $this->matchCronExpression($e[4], $time->format('w'));
return $match;
}
diff --git a/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php b/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php
index e9f4c61c7f551..76e9627ad7098 100644
--- a/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php
+++ b/app/code/Magento/Cron/Test/Unit/Model/ScheduleTest.php
@@ -6,6 +6,9 @@
namespace Magento\Cron\Test\Unit\Model;
use Magento\Cron\Model\Schedule;
+use Magento\Framework\Intl\DateTimeFactory;
+use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
+use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
* Class \Magento\Cron\Test\Unit\Model\ObserverTest
@@ -18,11 +21,27 @@ class ScheduleTest extends \PHPUnit\Framework\TestCase
*/
protected $helper;
+ /**
+ * @var \Magento\Cron\Model\ResourceModel\Schedule
+ */
protected $resourceJobMock;
+ /**
+ * @var TimezoneInterface|\PHPUnit_Framework_MockObject_MockObject
+ */
+ private $timezoneConverter;
+
+ /**
+ * @var DateTimeFactory|\PHPUnit_Framework_MockObject_MockObject
+ */
+ private $dateTimeFactory;
+
+ /**
+ * @inheritdoc
+ */
protected function setUp()
{
- $this->helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
+ $this->helper = new ObjectManager($this);
$this->resourceJobMock = $this->getMockBuilder(\Magento\Cron\Model\ResourceModel\Schedule::class)
->disableOriginalConstructor()
@@ -32,18 +51,30 @@ protected function setUp()
$this->resourceJobMock->expects($this->any())
->method('getIdFieldName')
->will($this->returnValue('id'));
+
+ $this->timezoneConverter = $this->getMockBuilder(TimezoneInterface::class)
+ ->setMethods(['date'])
+ ->getMockForAbstractClass();
+
+ $this->dateTimeFactory = $this->getMockBuilder(DateTimeFactory::class)
+ ->setMethods(['create'])
+ ->getMock();
}
/**
+ * Test for SetCronExpr
+ *
* @param string $cronExpression
* @param array $expected
+ *
+ * @return void
* @dataProvider setCronExprDataProvider
*/
public function testSetCronExpr($cronExpression, $expected)
{
// 1. Create mocks
- /** @var \Magento\Cron\Model\Schedule $model */
- $model = $this->helper->getObject(\Magento\Cron\Model\Schedule::class);
+ /** @var Schedule $model */
+ $model = $this->helper->getObject(Schedule::class);
// 2. Run tested method
$model->setCronExpr($cronExpression);
@@ -61,7 +92,7 @@ public function testSetCronExpr($cronExpression, $expected)
*
* @return array
*/
- public function setCronExprDataProvider()
+ public function setCronExprDataProvider(): array
{
return [
['1 2 3 4 5', [1, 2, 3, 4, 5]],
@@ -121,27 +152,33 @@ public function setCronExprDataProvider()
}
/**
+ * Test for SetCronExprException
+ *
* @param string $cronExpression
+ *
+ * @return void
* @expectedException \Magento\Framework\Exception\CronException
* @dataProvider setCronExprExceptionDataProvider
*/
public function testSetCronExprException($cronExpression)
{
// 1. Create mocks
- /** @var \Magento\Cron\Model\Schedule $model */
- $model = $this->helper->getObject(\Magento\Cron\Model\Schedule::class);
+ /** @var Schedule $model */
+ $model = $this->helper->getObject(Schedule::class);
// 2. Run tested method
$model->setCronExpr($cronExpression);
}
/**
+ * Data provider
+ *
* Here is a list of allowed characters and values for Cron expression
* http://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
*
* @return array
*/
- public function setCronExprExceptionDataProvider()
+ public function setCronExprExceptionDataProvider(): array
{
return [
[''],
@@ -153,17 +190,31 @@ public function setCronExprExceptionDataProvider()
}
/**
+ * Test for trySchedule
+ *
* @param int $scheduledAt
* @param array $cronExprArr
* @param $expected
+ *
+ * @return void
* @dataProvider tryScheduleDataProvider
*/
public function testTrySchedule($scheduledAt, $cronExprArr, $expected)
{
// 1. Create mocks
+ $this->timezoneConverter->method('getConfigTimezone')
+ ->willReturn('UTC');
+
+ $this->dateTimeFactory->method('create')
+ ->willReturn(new \DateTime());
+
/** @var \Magento\Cron\Model\Schedule $model */
$model = $this->helper->getObject(
- \Magento\Cron\Model\Schedule::class
+ \Magento\Cron\Model\Schedule::class,
+ [
+ 'timezoneConverter' => $this->timezoneConverter,
+ 'dateTimeFactory' => $this->dateTimeFactory,
+ ]
);
// 2. Set fixtures
@@ -177,22 +228,29 @@ public function testTrySchedule($scheduledAt, $cronExprArr, $expected)
$this->assertEquals($expected, $result);
}
+ /**
+ * Test for tryScheduleWithConversionToAdminStoreTime
+ *
+ * @return void
+ */
public function testTryScheduleWithConversionToAdminStoreTime()
{
$scheduledAt = '2011-12-13 14:15:16';
$cronExprArr = ['*', '*', '*', '*', '*'];
- // 1. Create mocks
- $timezoneConverter = $this->createMock(\Magento\Framework\Stdlib\DateTime\TimezoneInterface::class);
- $timezoneConverter->expects($this->once())
- ->method('date')
- ->with($scheduledAt)
- ->willReturn(new \DateTime($scheduledAt));
+ $this->timezoneConverter->method('getConfigTimezone')
+ ->willReturn('UTC');
+
+ $this->dateTimeFactory->method('create')
+ ->willReturn(new \DateTime());
/** @var \Magento\Cron\Model\Schedule $model */
$model = $this->helper->getObject(
\Magento\Cron\Model\Schedule::class,
- ['timezoneConverter' => $timezoneConverter]
+ [
+ 'timezoneConverter' => $this->timezoneConverter,
+ 'dateTimeFactory' => $this->dateTimeFactory,
+ ]
);
// 2. Set fixtures
@@ -207,11 +265,15 @@ public function testTryScheduleWithConversionToAdminStoreTime()
}
/**
+ * Data provider
+ *
* @return array
*/
- public function tryScheduleDataProvider()
+ public function tryScheduleDataProvider(): array
{
$date = '2011-12-13 14:15:16';
+ $timestamp = (new \DateTime($date))->getTimestamp();
+ $day = 'Monday';
return [
[$date, [], false],
[$date, null, false],
@@ -219,19 +281,23 @@ public function tryScheduleDataProvider()
[$date, [], false],
[$date, null, false],
[$date, false, false],
- [strtotime($date), ['*', '*', '*', '*', '*'], true],
- [strtotime($date), ['15', '*', '*', '*', '*'], true],
- [strtotime($date), ['*', '14', '*', '*', '*'], true],
- [strtotime($date), ['*', '*', '13', '*', '*'], true],
- [strtotime($date), ['*', '*', '*', '12', '*'], true],
- [strtotime('Monday'), ['*', '*', '*', '*', '1'], true],
+ [$timestamp, ['*', '*', '*', '*', '*'], true],
+ [$timestamp, ['15', '*', '*', '*', '*'], true],
+ [$timestamp, ['*', '14', '*', '*', '*'], true],
+ [$timestamp, ['*', '*', '13', '*', '*'], true],
+ [$timestamp, ['*', '*', '*', '12', '*'], true],
+ [(new \DateTime($day))->getTimestamp(), ['*', '*', '*', '*', '1'], true],
];
}
/**
+ * Test for matchCronExpression
+ *
* @param string $cronExpressionPart
* @param int $dateTimePart
* @param bool $expectedResult
+ *
+ * @return void
* @dataProvider matchCronExpressionDataProvider
*/
public function testMatchCronExpression($cronExpressionPart, $dateTimePart, $expectedResult)
@@ -248,9 +314,11 @@ public function testMatchCronExpression($cronExpressionPart, $dateTimePart, $exp
}
/**
+ * Data provider
+ *
* @return array
*/
- public function matchCronExpressionDataProvider()
+ public function matchCronExpressionDataProvider(): array
{
return [
['*', 0, true],
@@ -287,7 +355,11 @@ public function matchCronExpressionDataProvider()
}
/**
+ * Test for matchCronExpressionException
+ *
* @param string $cronExpressionPart
+ *
+ * @return void
* @expectedException \Magento\Framework\Exception\CronException
* @dataProvider matchCronExpressionExceptionDataProvider
*/
@@ -304,9 +376,11 @@ public function testMatchCronExpressionException($cronExpressionPart)
}
/**
+ * Data provider
+ *
* @return array
*/
- public function matchCronExpressionExceptionDataProvider()
+ public function matchCronExpressionExceptionDataProvider(): array
{
return [
['1/2/3'], //Invalid cron expression, expecting 'match/modulus': 1/2/3
@@ -317,8 +391,12 @@ public function matchCronExpressionExceptionDataProvider()
}
/**
+ * Test for GetNumeric
+ *
* @param mixed $param
* @param int $expectedResult
+ *
+ * @return void
* @dataProvider getNumericDataProvider
*/
public function testGetNumeric($param, $expectedResult)
@@ -335,9 +413,11 @@ public function testGetNumeric($param, $expectedResult)
}
/**
+ * Data provider
+ *
* @return array
*/
- public function getNumericDataProvider()
+ public function getNumericDataProvider(): array
{
return [
[null, false],
@@ -362,6 +442,11 @@ public function getNumericDataProvider()
];
}
+ /**
+ * Test for tryLockJobSuccess
+ *
+ * @return void
+ */
public function testTryLockJobSuccess()
{
$scheduleId = 1;
@@ -386,6 +471,11 @@ public function testTryLockJobSuccess()
$this->assertEquals(Schedule::STATUS_RUNNING, $model->getStatus());
}
+ /**
+ * Test for tryLockJobFailure
+ *
+ * @return void
+ */
public function testTryLockJobFailure()
{
$scheduleId = 1;
From 7ef7fdeb39623fb5e9da437724993396817609df Mon Sep 17 00:00:00 2001
From: Serhiy Yelahin
Date: Tue, 5 Feb 2019 13:22:39 +0200
Subject: [PATCH 2/8] MAGETWO-97950: Minicart isn't updated for disabled
products
---
.../frontend/templates/cart/noItems.phtml | 7 ++++
.../view/frontend/web/js/empty-cart.js | 12 ++++++
...efrontGuestCheckoutDisabledProductTest.xml | 41 ++++++++++++++++---
3 files changed, 54 insertions(+), 6 deletions(-)
create mode 100644 app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
diff --git a/app/code/Magento/Checkout/view/frontend/templates/cart/noItems.phtml b/app/code/Magento/Checkout/view/frontend/templates/cart/noItems.phtml
index 1c0c221a550cd..67ac4a9335565 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/cart/noItems.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/cart/noItems.phtml
@@ -13,3 +13,10 @@
$block->escapeUrl($block->getContinueShoppingUrl())) ?>
= $block->getChildHtml('shopping.cart.table.after') ?>
+
\ No newline at end of file
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
new file mode 100644
index 0000000000000..27d38697afe39
--- /dev/null
+++ b/app/code/Magento/Checkout/view/frontend/web/js/empty-cart.js
@@ -0,0 +1,12 @@
+/**
+ * Copyright © Magento, Inc. All rights reserved.
+ * See COPYING.txt for license details.
+ */
+
+define([
+ 'Magento_Customer/js/customer-data'
+], function (customerData) {
+ 'use strict';
+
+ customerData.reload(['cart'], false);
+});
diff --git a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
index a2f08353a4f3b..034c2bc6f051b 100644
--- a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
+++ b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
@@ -22,6 +22,9 @@
+
+
+
@@ -70,7 +73,10 @@
+
+
+
@@ -79,13 +85,11 @@
-
-
@@ -94,8 +98,6 @@
-
-
@@ -113,10 +115,37 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 532ca5d9cc11685ceed4fa1923662fa0e037e4b3 Mon Sep 17 00:00:00 2001
From: Serhiy Yelahin
Date: Tue, 5 Feb 2019 16:14:00 +0200
Subject: [PATCH 3/8] MAGETWO-97950: Minicart isn't updated for disabled
products
---
.../Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
index 034c2bc6f051b..e5e7c3834bf7d 100644
--- a/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
+++ b/app/code/Magento/Quote/Test/Mftf/Test/StorefrontGuestCheckoutDisabledProductTest.xml
@@ -74,7 +74,7 @@
-
+
@@ -123,7 +123,7 @@
-
+
From 786b2fa832fcc75d5343a2f6f5bffb6aee8f4a79 Mon Sep 17 00:00:00 2001
From: Mastiuhin Olexandr
Date: Fri, 8 Feb 2019 21:52:18 +0200
Subject: [PATCH 4/8] MAGETWO-97425: Country of Manufacture displays empty
under More Information tab
---
.../Catalog/Block/Product/View/Attributes.php | 8 +++++++-
.../Unit/Block/Product/View/AttributesTest.php | 16 ++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/app/code/Magento/Catalog/Block/Product/View/Attributes.php b/app/code/Magento/Catalog/Block/Product/View/Attributes.php
index b353e477a056c..8494b690bad9f 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Attributes.php
@@ -16,6 +16,8 @@
use Magento\Framework\Pricing\PriceCurrencyInterface;
/**
+ * Attributes attributes block
+ *
* @api
* @since 100.0.2
*/
@@ -56,6 +58,8 @@ public function __construct(
}
/**
+ * Returns a Product.
+ *
* @return Product
*/
public function getProduct()
@@ -67,6 +71,8 @@ public function getProduct()
}
/**
+ * Additional data.
+ *
* $excludeAttr is optional array of attribute codes to
* exclude them from additional data array
*
@@ -89,7 +95,7 @@ public function getAdditionalData(array $excludeAttr = [])
$value = $this->priceCurrency->convertAndFormat($value);
}
- if (is_string($value) && strlen($value)) {
+ if (is_string($value) && strlen(trim($value))) {
$data[$attribute->getAttributeCode()] = [
'label' => __($attribute->getStoreLabel()),
'value' => $value,
diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
index 4602a0d99f6f1..a42b167bb432a 100644
--- a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
@@ -138,6 +138,22 @@ public function testGetAttributeNoValue()
$this->assertTrue(empty($attributes['phrase']));
}
+ /**
+ * Test getAttribute whitespaces.
+ *
+ * @return void
+ */
+ public function testGetAttributeWhitespacesValue()
+ {
+ $this->phrase = ' ';
+ $this->frontendAttribute
+ ->expects($this->any())
+ ->method('getValue')
+ ->willReturn($this->phrase);
+ $attributes = $this->attributesBlock->getAdditionalData();
+ $this->assertTrue(empty($attributes['phrase']));
+ }
+
/**
* @return void
*/
From 16f7465bef4cc8129e2fe4fa7ec8d686c9965243 Mon Sep 17 00:00:00 2001
From: Mastiuhin Olexandr
Date: Mon, 11 Feb 2019 12:12:16 +0200
Subject: [PATCH 5/8] MAGETWO-97425: Country of Manufacture displays empty
under More Information tab
---
.../Block/Product/View/AttributesTest.php | 29 ++++++++-----------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
index a42b167bb432a..66a62b444b4af 100644
--- a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
@@ -125,33 +125,28 @@ protected function setUp()
}
/**
+ * Get attribute with no value phrase
+ *
+ * @param string $phrase
* @return void
+ * @dataProvider noValue
*/
- public function testGetAttributeNoValue()
+ public function testGetAttributeNoValue(string $phrase)
{
- $this->phrase = '';
- $this->frontendAttribute
- ->expects($this->any())
- ->method('getValue')
- ->willReturn($this->phrase);
+ $this->frontendAttribute->method('getValue')
+ ->willReturn($phrase);
$attributes = $this->attributesBlock->getAdditionalData();
- $this->assertTrue(empty($attributes['phrase']));
+ $this->assertArrayNotHasKey('phrase', $attributes);
}
/**
- * Test getAttribute whitespaces.
+ * No value data provider
*
- * @return void
+ * @return array
*/
- public function testGetAttributeWhitespacesValue()
+ public function noValue()
{
- $this->phrase = ' ';
- $this->frontendAttribute
- ->expects($this->any())
- ->method('getValue')
- ->willReturn($this->phrase);
- $attributes = $this->attributesBlock->getAdditionalData();
- $this->assertTrue(empty($attributes['phrase']));
+ return [[' '], ['']];
}
/**
From 572693882f7a39768bfe31fbaa206fc696072ada Mon Sep 17 00:00:00 2001
From: Mastiuhin Olexandr
Date: Mon, 11 Feb 2019 12:38:06 +0200
Subject: [PATCH 6/8] MAGETWO-97425: Country of Manufacture displays empty
under More Information tab
---
.../Catalog/Test/Unit/Block/Product/View/AttributesTest.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
index 66a62b444b4af..69133c1429be5 100644
--- a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
@@ -144,7 +144,7 @@ public function testGetAttributeNoValue(string $phrase)
*
* @return array
*/
- public function noValue()
+ public function noValue(): array
{
return [[' '], ['']];
}
From f461c3dcbd63f8cdf0fe18ab4de7c89ece0dde71 Mon Sep 17 00:00:00 2001
From: Mastiuhin Olexandr
Date: Mon, 11 Feb 2019 15:29:41 +0200
Subject: [PATCH 7/8] MAGETWO-97425: Country of Manufacture displays empty
under More Information tab
---
.../Catalog/Test/Unit/Block/Product/View/AttributesTest.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
index 69133c1429be5..2310b1f8b871c 100644
--- a/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Block/Product/View/AttributesTest.php
@@ -129,7 +129,7 @@ protected function setUp()
*
* @param string $phrase
* @return void
- * @dataProvider noValue
+ * @dataProvider noValueProvider
*/
public function testGetAttributeNoValue(string $phrase)
{
@@ -144,7 +144,7 @@ public function testGetAttributeNoValue(string $phrase)
*
* @return array
*/
- public function noValue(): array
+ public function noValueProvider(): array
{
return [[' '], ['']];
}
From caac0c28ad050f70531bd061935e56c9b93788f9 Mon Sep 17 00:00:00 2001
From: Nikita Shcherbatykh
Date: Fri, 15 Feb 2019 10:54:38 +0200
Subject: [PATCH 8/8] MAGETWO-97684: State is always required in backend in
customer address form
---
.../Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
index 9a025211c9b0a..0aeed1562c51e 100644
--- a/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
+++ b/app/code/Magento/Customer/Block/Adminhtml/Edit/Renderer/Region.php
@@ -48,7 +48,7 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
$regionId = $element->getForm()->getElement('region_id')->getValue();
- $html = '';
+ $html = '
';
$element->setClass('input-text admin__control-text');
$element->setRequired(true);
$html .= $element->getLabelHtml() . '
';