We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6815f3f commit f707fb2Copy full SHA for f707fb2
1 file changed
tests/system/Validation/ValidationTest.php
@@ -240,6 +240,22 @@ public function testRunReturnsFalseWithNothingToDo(): void
240
$this->assertFalse($this->validation->run([]));
241
}
242
243
+ public function testRuleClassesInstantiatedOnce(): void
244
+ {
245
+ $this->validation->setRules([]);
246
+ $this->validation->run([]);
247
+ $count1 = count(
248
+ $this->getPrivateProperty($this->validation, 'ruleSetInstances')
249
+ );
250
+
251
252
+ $count2 = count(
253
254
255
256
+ $this->assertSame($count1, $count2);
257
+ }
258
259
public function testRunDoesTheBasics(): void
260
{
261
$data = ['foo' => 'notanumber'];
0 commit comments