Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 9c7d645

Browse files
committed
magento-engcom/magento2ce#1371: Build stabilization
- Forward ported unit test changes from 2.2 - Supressed static tests coupling warning for unit test
1 parent 033d4b8 commit 9c7d645

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

app/code/Magento/Customer/Test/Unit/Block/Widget/DobTest.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,16 @@ public function testGetHtmlExtraParamsWithoutRequiredOption()
474474
{
475475
$this->escaper->expects($this->any())
476476
->method('escapeHtml')
477-
->with('{"validate-date":{"dateFormat":"M\/d\/yy"}}')
478-
->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/yy"}}'));
477+
->with('{"validate-date":{"dateFormat":"M\/d\/Y"}}')
478+
->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/Y"}}'));
479+
479480
$this->attribute->expects($this->once())
480481
->method("isRequired")
481482
->willReturn(false);
482483

483484
$this->assertEquals(
484485
$this->_block->getHtmlExtraParams(),
485-
'data-validate="{"validate-date":{"dateFormat":"M\/d\/yy"}}"'
486+
'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y"}}"'
486487
);
487488
}
488489

@@ -493,12 +494,14 @@ public function testGetHtmlExtraParamsWithRequiredOption()
493494
->willReturn(true);
494495
$this->escaper->expects($this->any())
495496
->method('escapeHtml')
496-
->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/yy"}}')
497-
->will($this->returnValue('{"required":true,"validate-date":{"dateFormat":"M\/d\/yy"}}'));
497+
->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}')
498+
->will($this->returnValue('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}'));
499+
500+
498501
$this->context->expects($this->any())->method('getEscaper')->will($this->returnValue($this->escaper));
499502

500503
$this->assertEquals(
501-
'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/yy"}}"',
504+
'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}"',
502505
$this->_block->getHtmlExtraParams()
503506
);
504507
}

app/code/Magento/Sitemap/Test/Unit/Model/ResourceModel/Cms/PageTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
/**
2424
* Provide tests for Cms Page resource model.
25+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2526
*/
2627
class PageTest extends TestCase
2728
{

0 commit comments

Comments
 (0)