/**
  * {@inheritdoc}
  */
 public function validateBlock(ErrorElement $errorElement, BlockInterface $block)
 {
     if (($name = $block->getSetting('menu_name')) && $name !== '' && !$this->menuProvider->has($name)) {
         // If we specified a menu_name, check that it exists
         $errorElement->with('menu_name')->addViolation('sonata.block.menu.not_existing', array('name' => $name))->end();
     }
 }
 public function testGroupMenuProviderName()
 {
     $this->assertTrue($this->provider->has('sonata_group_menu'));
 }