コード例 #1
0
 public function test_custom_message()
 {
     BookPresence::$validates_presence_of[0]['message'] = 'is using a custom message.';
     $book = new BookPresence(array('name' => null));
     $book->is_valid();
     $this->assert_equals('is using a custom message.', $book->errors->on('name'));
 }
コード例 #2
0
 public function testValidZero()
 {
     $book = new BookPresence(array('name' => 0));
     $this->assertTrue($book->isValid());
 }
コード例 #3
0
 public function test_valid_zero()
 {
     $book = new BookPresence(array('name' => 0));
     $this->assert_true($book->is_valid());
 }