public function testIterator()
{
$this->collection->add($ls = new Command(new CommandConfig('ls')));
$this->collection->add($cd = new Command(new CommandConfig('cd')));
$result = iterator_to_array($this->collection);
$this->assertSame(array('ls' => $ls, 'cd' => $cd), $result);
}