コード例 #1
0
 /**
  * @test
  * @group metadata
  * @group contactperson
  */
 public function the_index_of_a_telephone_number_can_be_retrieved()
 {
     $numberOne = new TelephoneNumber('123');
     $numberTwo = new TelephoneNumber('456');
     $notInList = new TelephoneNumber('789');
     $list = new TelephoneNumberList(array($numberOne, $numberTwo));
     $this->assertEquals(0, $list->indexOf($numberOne));
     $this->assertEquals(1, $list->indexOf($numberTwo));
     $this->assertEquals(-1, $list->indexOf($notInList), 'An element not in the list has an index of -1');
 }