@@ -33,7 +33,7 @@ class DobTest extends \PHPUnit\Framework\TestCase
33
33
const YEAR = '2014 ' ;
34
34
35
35
// Value of date('Y', strtotime(self::DATE))
36
- const DATE_FORMAT = 'M/d/yy ' ;
36
+ const DATE_FORMAT = 'M/d/Y ' ;
37
37
38
38
/** Constants used by Dob::setDateInput($code, $html) */
39
39
const DAY_HTML =
@@ -485,16 +485,16 @@ public function testGetHtmlExtraParamsWithoutRequiredOption()
485
485
{
486
486
$ this ->escaper ->expects ($ this ->any ())
487
487
->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 "}} ' ));
490
490
491
491
$ this ->attribute ->expects ($ this ->once ())
492
492
->method ("isRequired " )
493
493
->willReturn (false );
494
494
495
495
$ this ->assertEquals (
496
496
$ this ->_block ->getHtmlExtraParams (),
497
- 'data-validate="{"validate-date":{"dateFormat":"M\/d\/yy "}}" '
497
+ 'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y "}}" '
498
498
);
499
499
}
500
500
@@ -506,14 +506,14 @@ public function testGetHtmlExtraParamsWithRequiredOption()
506
506
507
507
$ this ->escaper ->expects ($ this ->any ())
508
508
->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 "}} ' ));
511
511
512
512
513
513
$ this ->context ->expects ($ this ->any ())->method ('getEscaper ' )->will ($ this ->returnValue ($ this ->escaper ));
514
514
515
515
$ this ->assertEquals (
516
- 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/yy "}}" ' ,
516
+ 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y "}}" ' ,
517
517
$ this ->_block ->getHtmlExtraParams ()
518
518
);
519
519
}
0 commit comments