targetFile()); $this->builder = new Builder(); $this->builder->getConfiguration()->setUseCachedMetas(false); $this->configureBuilder($this->builder); $this->builder->build($this->sourceFile(), $this->targetFile()); } protected function configureBuilder(Builder $builder): void { } protected function sourceFile(string $file = ''): string { return __DIR__ . '/' . $this->getFixturesDirectory() . '/input/' . $file; } protected function targetFile(string $file = ''): string { return __DIR__ . '/' . $this->getFixturesDirectory() . '/output/' . $file; } /** @throws Exception */ protected function getFileContents(string $path): string { $contents = file_get_contents($path); if ($contents === false) { throw new Exception('Could not load file.'); } return $contents; } }