/**
  * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidDefinitionException
  * @expectedExceptionMessageRegExp /^Could not create service "new-service-name", because class "\\NonExistingClass" does not exist\.$/
  */
 public function testCreatingFromMissingClass()
 {
     $builder = new DefinitionBuilder(new ParametersValidator());
     $container = new ContainerBuilder();
     $config = ['class' => '\\NonExistingClass'];
     $builder->buildDefinition($container, 'someContextId', 'new-service-name', $config);
 }
 /**
  * @param ContainerBuilder $container
  * @param string           $contextId
  * @param string           $definitionName
  * @param array            $config
  *
  * @return \Symfony\Component\DependencyInjection\Definition
  */
 protected function buildDefinition(ContainerBuilder $container, $contextId, $definitionName, array &$config)
 {
     return $this->definitionBuilder->buildDefinition($container, $contextId, $definitionName, $config);
 }