diff --git a/Cake/Test/TestCase/ORM/ValidatorTest.php b/Cake/Test/TestCase/ORM/ValidatorTest.php index 2bec9f530ed..f7ea88f0141 100644 --- a/Cake/Test/TestCase/ORM/ValidatorTest.php +++ b/Cake/Test/TestCase/ORM/ValidatorTest.php @@ -410,4 +410,17 @@ public function testArrayAccessUset() { $this->assertFalse(isset($validator['title'])); } +/** + * Tests the countable interface + * + * @return void + */ + public function testCount() { + $validator = new Validator; + $validator + ->add('email', 'alpha', ['rule' => 'alphanumeric']) + ->add('title', 'cool', ['rule' => 'isCool', 'scope' => 'thing']); + $this->assertCount(2, $validator); + } + }