Exemplo n.º 1
0
 /** @test */
 public function it_is_equal_to_other_instance_with_the_same_address()
 {
     $email1 = new EmailAddress('*****@*****.**');
     $email2 = new EmailAddress('*****@*****.**');
     $this->assertTrue($email1->equals($email2));
     $email3 = new EmailAddress('*****@*****.**');
     $email4 = new EmailAddress('*****@*****.**');
     $this->assertTrue($email3->equals($email4));
 }
Exemplo n.º 2
0
 public function equals(EmailAddress $email)
 {
     return strtolower($this->address()) === strtolower($email->address());
 }