Skip to content

Commit 0a68eaa

Browse files
committed
AC-13535: Minimum and maximum value validation does not work for DOB attribute on Storefront
1 parent ad81a01 commit 0a68eaa

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/code/Magento/Customer/Test/Unit/Plugin/ValidateDobOnSaveTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
use PHPUnit\Framework\MockObject\MockObject;
1919
use PHPUnit\Framework\TestCase;
2020

21+
/**
22+
* Unit test for validate date of birth plugin
23+
*
24+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
25+
*/
2126
class ValidateDobOnSaveTest extends TestCase
2227
{
2328
/** @var EavConfig&MockObject */
@@ -89,6 +94,13 @@ public function testDobAfterMaxThrows(): void
8994
$this->assertFalse($called);
9095
}
9196

97+
/**
98+
* @return void
99+
* @throws InputException
100+
* @throws \Magento\Framework\Exception\LocalizedException
101+
* @throws \PHPUnit\Framework\MockObject\Exception
102+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
103+
*/
92104
public function testDobWithinRangeCallsProceedAndReturnsResult(): void
93105
{
94106
$customer = $this->createCustomerMock('1990-06-15');
@@ -210,6 +222,7 @@ private function createAttributeMockForGetData(string $key, $value)
210222
* @throws InputException
211223
* @throws \Magento\Framework\Exception\LocalizedException
212224
* @throws \PHPUnit\Framework\MockObject\Exception
225+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
213226
*/
214227
public function testInvalidJsonRulesCaughtAndIgnored(): void
215228
{

0 commit comments

Comments
 (0)