Skip to content

Commit

Permalink
Adding test for countable interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 20, 2013
1 parent 28b25dd commit b3cf800
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Cake/Test/TestCase/ORM/ValidatorTest.php
Expand Up @@ -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);
}

}

0 comments on commit b3cf800

Please sign in to comment.