Neos\Flow\Tests\Unit\I18n\FormatResolverTest::fullyQualifiedFormatterWithLowercaseVendorNameIsCorrectlyBeingUsed PHP Method

fullyQualifiedFormatterWithLowercaseVendorNameIsCorrectlyBeingUsed() public method

    public function fullyQualifiedFormatterWithLowercaseVendorNameIsCorrectlyBeingUsed()
    {
        $mockFormatter = $this->createMock(I18n\Formatter\FormatterInterface::class);
        $mockFormatter->expects($this->once())->method('format')->with(123, $this->sampleLocale, [])->will($this->returnValue('FormatterOutput42'));
        $mockObjectManager = $this->createMock(ObjectManagerInterface::class);
        $mockObjectManager->expects($this->once())->method('isRegistered')->with('acme\\Foo\\SampleFormatter')->will($this->returnValue(true));
        $mockObjectManager->expects($this->once())->method('get')->with('acme\\Foo\\SampleFormatter')->will($this->returnValue($mockFormatter));
        $mockReflectionService = $this->createMock(ReflectionService::class);
        $mockReflectionService->expects($this->once())->method('isClassImplementationOf')->with('acme\\Foo\\SampleFormatter', I18n\Formatter\FormatterInterface::class)->will($this->returnValue(true));
        $formatResolver = new I18n\FormatResolver();
        $formatResolver->injectObjectManager($mockObjectManager);
        $this->inject($formatResolver, 'reflectionService', $mockReflectionService);
        $actual = $formatResolver->resolvePlaceholders('{0,acme\\Foo\\SampleFormatter}', [123], $this->sampleLocale);
        $this->assertEquals('FormatterOutput42', $actual);
    }