Пример #1
0
 /**
  * Test that email() returns true for a valid email.
  */
 public function testEmail()
 {
     $this->assertTrue(Validate::email('*****@*****.**', false));
     $this->assertTrue(Validate::email('*****@*****.**', false));
     $this->assertTrue(Validate::email('*****@*****.**', false));
     $this->assertTrue(Validate::email('*****@*****.**', false));
     $this->assertTrue(Validate::email('*****@*****.**', false));
     $this->assertTrue(Validate::email('*****@*****.**', true));
     $this->assertFalse(Validate::email('email@titon', false));
     $this->assertFalse(Validate::email('email@titon.com.', false));
     $this->assertFalse(Validate::email('email@sub/titon.com', false));
     $this->assertFalse(Validate::email('email@sub:titon.com', false));
     $this->assertFalse(Validate::email('email@sub_titon.com', false));
     $this->assertFalse(Validate::email('*****@*****.**', true));
 }