File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
app/code/Magento/Customer/Test/Unit/Block/Widget Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -461,4 +461,23 @@ public function testGetMaxDateRangeWithException()
461
461
);
462
462
$ this ->assertNull ($ this ->_block ->getMaxDateRange ());
463
463
}
464
+
465
+ public function testGetHtmlExtraParamsWithoutRequiredOption () {
466
+ $ this ->attribute ->expects ($ this ->once ())
467
+ ->method ("isRequired " )
468
+ ->willReturn (false );
469
+
470
+ $ this ->assertEquals ($ this ->_block ->getHtmlExtraParams (), 'data-validate="{ \'validate-date-au \':true}" ' );
471
+ }
472
+
473
+ public function testGetHtmlExtraParamsWithRequiredOption () {
474
+ $ this ->attribute ->expects ($ this ->once ())
475
+ ->method ("isRequired " )
476
+ ->willReturn (true );
477
+
478
+ $ this ->assertEquals (
479
+ $ this ->_block ->getHtmlExtraParams (),
480
+ 'data-validate="{ \'validate-date-au \':true, required:true}" '
481
+ );
482
+ }
464
483
}
You can’t perform that action at this time.
0 commit comments