@@ -474,15 +474,16 @@ public function testGetHtmlExtraParamsWithoutRequiredOption()
474
474
{
475
475
$ this ->escaper ->expects ($ this ->any ())
476
476
->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
+
479
480
$ this ->attribute ->expects ($ this ->once ())
480
481
->method ("isRequired " )
481
482
->willReturn (false );
482
483
483
484
$ this ->assertEquals (
484
485
$ this ->_block ->getHtmlExtraParams (),
485
- 'data-validate="{"validate-date":{"dateFormat":"M\/d\/yy "}}" '
486
+ 'data-validate="{"validate-date":{"dateFormat":"M\/d\/Y "}}" '
486
487
);
487
488
}
488
489
@@ -493,12 +494,14 @@ public function testGetHtmlExtraParamsWithRequiredOption()
493
494
->willReturn (true );
494
495
$ this ->escaper ->expects ($ this ->any ())
495
496
->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
+
498
501
$ this ->context ->expects ($ this ->any ())->method ('getEscaper ' )->will ($ this ->returnValue ($ this ->escaper ));
499
502
500
503
$ this ->assertEquals (
501
- 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/yy "}}" ' ,
504
+ 'data-validate="{"required":true,"validate-date":{"dateFormat":"M\/d\/Y "}}" ' ,
502
505
$ this ->_block ->getHtmlExtraParams ()
503
506
);
504
507
}
0 commit comments