createMock(RequestedEntityServiceInterface::class); $requestedEntityService->method('getClass')->willReturn(self::CLASS_NAME); $requestedActionService = $this->createMock(RequestedActionServiceInterface::class); $requestedActionService->method('getRequestedEntity')->willReturn($requestedEntityService); $requestedActionService->method('getActionType')->willReturn(self::ACTION_TYPE); $this->templateNameService = new TemplateNameService($requestedActionService); } public function testGetMoleculeName(): void { $this->assertEquals(self::EXPECTED_MOLECULE_TEMPLATE_NAME, $this->templateNameService->getMoleculeTemplateName()); } public function testGetAtomName(): void { $this->assertEquals(self::EXPECTED_ATOM_TEMPLATE_NAME, $this->templateNameService->getAtomTemplateName()); } }