Neos\Flow\Tests\Unit\I18n\TranslationProvider\XliffTranslationProviderTest::getModelSetsCorrectLocaleInModel PHP Метод

getModelSetsCorrectLocaleInModel() публичный Метод

    public function getModelSetsCorrectLocaleInModel()
    {
        $expectedSourcePath = 'expectedSourcePath';
        $expectedLocale = new I18n\Locale('za');
        $mockLocalizationService = $this->createMock(I18n\Service::class);
        $mockLocalizationService->expects($this->once())->method('getXliffFilenameAndPath')->will($this->returnValue([$expectedSourcePath, $expectedLocale]));
        $translationProvider = $this->getAccessibleMock(I18n\TranslationProvider\XliffTranslationProvider::class, ['dummy']);
        $translationProvider->injectLocalizationService($mockLocalizationService);
        $model = $translationProvider->_call('getModel', $this->samplePackageKey, $this->sampleSourceName, $this->sampleLocale);
        $this->assertAttributeSame($expectedLocale, 'locale', $model);
        $this->assertAttributeSame($expectedSourcePath, 'sourcePath', $model);
    }