public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, $expectedLocale) { $versionInfo = $this->generateVersionInfo(); $contentInfo = new ContentInfo(array('id' => 123)); $this->configResolver->expects($this->once())->method('getParameter')->with('languages')->will($this->returnValue($prioritizedLanguages)); $this->contentService->expects($this->once())->method('loadVersionInfo')->with($contentInfo)->will($this->returnValue($versionInfo)); $this->assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo)); }