/** * @test * @group metadata * @group contactperson */ public function the_index_of_an_email_address_can_be_retrieved() { $emailOne = new EmailAddress('*****@*****.**'); $emailTwo = new EmailAddress('*****@*****.**'); $notInList = new EmailAddress('*****@*****.**'); $list = new EmailAddressList(array($emailOne, $emailTwo)); $this->assertEquals(0, $list->indexOf($emailOne)); $this->assertEquals(1, $list->indexOf($emailTwo)); $this->assertEquals(-1, $list->indexOf($notInList), 'An element not in the list must have an index of -1'); }