예제 #1
0
 /**
  * Tests:
  *  1. the names() method returns an array
  *  2. the number of items in the array matches the number of items added
  *  3. the array returned contains just the names of the items added
  *
  * @return  void
  **/
 public function testNames()
 {
     $data = ['Crumb 1', 'Crumb 2'];
     $pathway = new Trail();
     $pathway->append('Crumb 1', 'index.php?option=com_lorem');
     $pathway->append('Crumb 2', 'index.php?option=com_ipsum');
     $names = $pathway->names();
     $this->assertTrue(is_array($names), 'names() should return an array');
     $this->assertCount(2, $names, 'names() returned incorrect number of entries');
     $this->assertEquals($names, $data);
 }