/** @test */
 public function testAll()
 {
     $converter = new TemplateToSubstringMapConverter();
     $map = $converter->convert('a <b  > c1; d', array('c1' => 'new-name'));
     $this->assertEquals(0, $map['a']->getOffset());
     $this->assertEquals(2, $map['a']->getLength());
     $this->assertEquals(2, $map['b']->getOffset());
     $this->assertEquals(5, $map['b']->getLength());
     $this->assertEquals(8, $map['new-name']->getOffset());
     $this->assertEquals(2, $map['new-name']->getLength());
 }
 static function newFromTemplate($inputIterator, $template, array $nameMap = array(), array $options = array())
 {
     $converter = new TemplateToSubstringMapConverter();
     return new self($inputIterator, $converter->convert($template, $nameMap), $options);
 }