src/CodeGeneration/Creation/AbstractCreator.php
private function updateRootDirOnTargetFile(): void
    {
        $realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
        if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
            $updatedPath = str_replace(
                '/src/',
                '/tests/',
                $this->targetFile->getPath()
            );
            $this->targetFile->setPath($updatedPath);
        }
    }
private function updateRootDirOnTargetFile(): void
    {
        $realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
        if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
            $updatedPath = str_replace(
                '/src/',
                '/tests/',
                $this->targetFile->getPath()
            );
            $this->targetFile->setPath($updatedPath);
        }
    }
private function updateRootDirOnTargetFile ( ) : void { $ realTemplateTestsPath = realpath ( self :: ROOT_TEMPLATE_PATH . self :: TEST_DIR ) ; if ( 0 === \ strpos ( $ this -> templateFile -> getPath ( ) , $ realTemplateTestsPath ) ) { $ updatedPath = str_replace ( '/src/' , '/tests/' , $ this -> targetFile -> getPath ( ) ) ; $ this -> targetFile -> setPath ( $ updatedPath ) ; } }
Where the template file is in tests, we need to fix that in the target file
Where the template file is in tests we need to fix that in the target file