classWorkflowTestextends TestCase { use WorkflowBuilderTrait;
publicfunctiontestGetMarkingWithEmptyDefinition() { $this->expectException(LogicException::class); $this->expectExceptionMessage('The Marking is empty and there is no initial place for workflow "unnamed".'); $subject = newSubject(); $workflow = newWorkflow(newDefinition([], []), newMethodMarkingStore());
if(null !== $definition){ // no-op
}elseif($this->isLoadingInstanceof){ $definition = newChildDefinition(''); }elseif(isset($service['parent'])){ if('' !== $service['parent'] && '@' === $service['parent'][0]){ thrownewInvalidArgumentException(sprintf('The value of the "parent" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['parent'], substr($service['parent'], 1))); }
if(null !== $definition){ // no-op
}elseif($this->isLoadingInstanceof){ $definition = newChildDefinition(''); }elseif(isset($service['parent'])){ if('' !== $service['parent'] && '@' === $service['parent'][0]){ thrownewInvalidArgumentException(sprintf('The value of the "parent" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['parent'], substr($service['parent'], 1))); }
try{ if(!$r = $this->container->getReflectionClass($class)){ if(null === $class){ thrownewRuntimeException(sprintf('Invalid service "%s": the class is not set.', $this->currentId)); }
$loader->registerClasses(newDefinition(), 'Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\\', 'Prototype/%sub_dir%/*'); $loader->registerClasses(newDefinition(), 'Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\\', 'Prototype/%sub_dir%/*'); // loading twice should not be an issue
$loader->registerAliasesForSinglyImplementedInterfaces();