public function testMultipleEmbedBlocks()
 {
     $this->getSonataBlock()->expects($this->at(0))->method('render')->with($this->equalTo(array('name' => 'foo')));
     $this->getSonataBlock()->expects($this->at(1))->method('render')->with($this->equalTo(array('name' => 'cat')));
     $helper = new CmfBlockHelper($this->getSonataBlock(), '%embed-block:"', '"%');
     $helper->embedBlocks('%embed-block:"foo"% bar %embed-block:"cat"%');
 }
 /**
  * @dataProvider blockDelimitersData
  *
  * @param $prefix
  * @param $postfix
  */
 public function testMultipleEmbedBlocks($prefix, $postfix)
 {
     $this->getSonataBlock()->expects($this->at(0))->method('render')->with($this->equalTo(array('name' => 'foo')));
     $this->getSonataBlock()->expects($this->at(1))->method('render')->with($this->equalTo(array('name' => 'cat')));
     $parser = new EmbedBlocksParser($prefix, $postfix);
     $helper = new CmfBlockHelper($this->getSonataBlock(), $parser);
     $helper->embedBlocks("{$prefix}foo{$postfix} bar {$prefix}cat{$postfix}");
 }