Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
10 | class EntityTestCreator extends AbstractCreator |
||
11 | { |
||
12 | public const FIND_NAME = 'TemplateEntityTest'; |
||
13 | public const TEMPLATE_PATH = self::ROOT_TEMPLATE_PATH . '/tests/Entities/' . self::FIND_NAME . '.php'; |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $entityFqn; |
||
18 | |||
19 | public function configurePipeline(): void |
||
20 | { |
||
21 | parent::configurePipeline(); |
||
22 | $this->registerReplaceEntitiesNamespaceProcess(); |
||
23 | $this->registerEntityReplaceName($this->getEntityFqn()); |
||
24 | } |
||
25 | |||
26 | protected function registerReplaceEntitiesNamespaceProcess(): void |
||
27 | { |
||
28 | $process = new ReplaceEntitiesSubNamespaceProcess(); |
||
29 | $process->setProjectRootNamespace($this->projectRootNamespace); |
||
|
|||
30 | $process->setEntityFqn($this->getEntityFqn()); |
||
31 | $this->pipeline->register($process); |
||
32 | } |
||
33 | |||
34 | private function getEntityFqn(): string |
||
35 | { |
||
36 | return $this->entityFqn ?? $this->namespaceHelper->getEntityFqnFromEntityTestFqn($this->newObjectFqn); |
||
37 | } |
||
38 | |||
39 | public function setNewObjectFqnFromEntityFqn(string $entityFqn): self |
||
45 | } |
||
46 | } |
||
47 |