public function __construct($string)
 {
     parent::__construct();
     $this->string = $string;
     $this->pos = 0;
     $this->depth = 0;
     $this->regexps = array();
 }
 public function testOpenBlockExtension()
 {
     $count = 0;
     $parser = new SSTemplateParser();
     $parser->addOpenBlock('test', function ($res) use(&$count) {
         $count++;
     });
     $template = new SSViewer_FromString("<% test %>", $parser);
     $template->process(new SSViewerTestFixture());
     $this->assertEquals(1, $count);
 }