/** * 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 testClear() { $pathway = new Trail(); $pathway->append('Crumb 1', 'index.php?option=com_lorem'); $pathway->append('Crumb 2', 'index.php?option=com_ipsum'); $pathway->clear(); $items = $pathway->items(); $this->assertTrue(empty($items), 'items() should return an empty array after calling clear()'); }