public function test_validates_length_of_is() { BookLength::$validates_length_of[0] = array('name', 'is' => 2); $book = new BookLength(array('name' => '123')); $book->is_valid(); $this->assert_equals(array("Name is the wrong length (should be 2 characters)"), $book->errors->full_messages()); }
public function testValidatesLengthOfIs() { BookLength::$validatesLengthOf[0] = array('name', 'is' => 2); $book = new BookLength(array('name' => '123')); $book->isValid(); $this->assertEquals(array("Name is the wrong length (should be 2 characters)"), $book->errors->fullMessages()); }