source = new FirstNameSource(); $sourceMeta = new SourceMetaInformation($this->source); $folder = $sourceMeta->getNamespacePathMap()->getPath(); $this->templateMeta = new TemplatePathInformation($sourceMeta->getPureName(), $folder, 'entity'); } public function testFrameTemplatePath(): void { $this->assertEquals($this->getExpectedPath('html', 'molecule'), $this->templateMeta->getMoleculeTemplatePath()); } public function testContentTemplatePath(): void { $this->assertEquals($this->getExpectedPath('html', 'atom'), $this->templateMeta->getAtomTemplatePath()); } public function testSetType(): void { foreach (RESTResponseType::getValues() as $type) { $this->templateMeta->reloadType($type); $this->assertEquals($this->getExpectedPath($type, 'atom'), $this->templateMeta->getAtomTemplatePath()); $this->assertEquals($this->getExpectedPath($type, 'molecule'), $this->templateMeta->getMoleculeTemplatePath()); $this->assertEquals($type, $this->templateMeta->getCrud()); } } }