diff --git a/src/Tempest/Validation/src/Rules/ArrayList.php b/src/Tempest/Validation/src/Rules/ArrayList.php new file mode 100644 index 000000000..cb5e0975b --- /dev/null +++ b/src/Tempest/Validation/src/Rules/ArrayList.php @@ -0,0 +1,22 @@ +assertFalse($rule->isValid(['foo' => 'bar'])); + $this->assertTrue($rule->isValid([])); + $this->assertTrue($rule->isValid(['a', 'b', 'c'])); + $this->assertFalse($rule->isValid([0 => 'a', 1 => 'b', 3 => 'c'])); + $this->assertSame('Value must be a list', $rule->message()); + } +}