File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
dev/tests/integration/testsuite/Magento/Catalog/Model/Attribute/Backend Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ public function testBeforeSave(): void
61
61
}
62
62
63
63
/**
64
+ * Test that Product with attribute "Set Product as New"
65
+ * with starting date and with expired ending date throws Exception.
66
+ *
64
67
* @return void
65
68
*/
66
69
public function testValidate (): void
@@ -72,4 +75,19 @@ public function testValidate(): void
72
75
$ this ->expectExceptionMessage ((string )$ msg );
73
76
$ this ->startDate ->validate ($ product );
74
77
}
78
+
79
+ /**
80
+ * Test that Product with attribute "Set Product as New"
81
+ * without starting date and with expired ending date doesn't throw Exception.
82
+ *
83
+ * @return void
84
+ */
85
+ public function testValidatePastEndWithNoStart (): void
86
+ {
87
+ $ product = $ this ->productFactory ->create ();
88
+ $ actualResult = $ this ->startDate ->validate ($ product );
89
+ $ this ->assertEquals (true , $ actualResult );
90
+ $ noException = $ this ->getExpectedExceptionMessage ();
91
+ $ this ->assertNull ($ noException );
92
+ }
75
93
}
You can’t perform that action at this time.
0 commit comments