Neos\Flow\Tests\Unit\I18n\TranslatorTest::translateByIdTests PHP Method

translateByIdTests() public method

public translateByIdTests ( string $id, string $translatedId, string $expectedResult )
$id string
$translatedId string
$expectedResult string
    public function translateByIdTests($id, $translatedId, $expectedResult)
    {
        $mockTranslationProvider = $this->createMock(XliffTranslationProvider::class);
        $mockTranslationProvider->expects($this->once())->method('getTranslationById')->with($id)->will($this->returnValue($translatedId));
        $this->translator->injectTranslationProvider($mockTranslationProvider);
        $actualResult = $this->translator->translateById($id);
        $this->assertSame($expectedResult, $actualResult);
    }