eZ\Publish\Core\Helper\Tests\TranslationHelperTest::testGetTranslatedNameByContentInfoForcedLanguage PHP Method

testGetTranslatedNameByContentInfoForcedLanguage() public method

    public function testGetTranslatedNameByContentInfoForcedLanguage()
    {
        $versionInfo = $this->generateVersionInfo();
        $contentInfo = new ContentInfo(array('id' => 123));
        $this->configResolver->expects($this->never())->method('getParameter');
        $this->contentService->expects($this->exactly(2))->method('loadVersionInfo')->with($contentInfo)->will($this->returnValue($versionInfo));
        $this->assertSame('My name in english', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-GB'));
        $this->assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-US'));
    }