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

Commit 0296657

Browse files
committed
Refactoring DobTest
1 parent d01bc6b commit 0296657

File tree

1 file changed

+7
-7
lines changed
  • app/code/Magento/Customer/Test/Unit/Block/Widget

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DobTest extends \PHPUnit\Framework\TestCase
3333
const YEAR = '2014';
3434

3535
// Value of date('Y', strtotime(self::DATE))
36-
const DATE_FORMAT = 'M/d/yy';
36+
const DATE_FORMAT = 'M/d/Y';
3737

3838
/** Constants used by Dob::setDateInput($code, $html) */
3939
const DAY_HTML =
@@ -485,16 +485,16 @@ public function testGetHtmlExtraParamsWithoutRequiredOption()
485485
{
486486
$this->escaper->expects($this->any())
487487
->method('escapeHtml')
488-
->with('{"validate-date":{"dateFormat":"M\/d\/yy"}}')
489-
->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/yy"}}'));
488+
->with('{"validate-date":{"dateFormat":"M\/d\/Y"}}')
489+
->will($this->returnValue('{"validate-date":{"dateFormat":"M\/d\/Y"}}'));
490490

491491
$this->attribute->expects($this->once())
492492
->method("isRequired")
493493
->willReturn(false);
494494

495495
$this->assertEquals(
496496
$this->_block->getHtmlExtraParams(),
497-
'data-validate="{"validate-date":{"dateFormat":"M\/d\/yy"}}"'
497+
'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y"}}"'
498498
);
499499
}
500500

@@ -506,14 +506,14 @@ public function testGetHtmlExtraParamsWithRequiredOption()
506506

507507
$this->escaper->expects($this->any())
508508
->method('escapeHtml')
509-
->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/yy"}}')
510-
->will($this->returnValue('{"required":true,"validate-date":{"dateFormat":"M\/d\/yy"}}'));
509+
->with('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}')
510+
->will($this->returnValue('{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}'));
511511

512512

513513
$this->context->expects($this->any())->method('getEscaper')->will($this->returnValue($this->escaper));
514514

515515
$this->assertEquals(
516-
'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/yy"}}"',
516+
'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y"}}"',
517517
$this->_block->getHtmlExtraParams()
518518
);
519519
}

0 commit comments

Comments
 (0)