Neos\Flow\Tests\Unit\I18n\Cldr\Reader\PluralsReaderTest::setUp PHP Method

setUp() public method

public setUp ( ) : void
return void
    public function setUp()
    {
        $samplePluralRulesData = ['pluralRules[@locales="ro mo"]' => ['pluralRule[@count="one"]' => 'n is 1', 'pluralRule[@count="few"]' => 'n is 0 OR n is not 1 AND n mod 100 in 1..19']];
        $mockModel = $this->getAccessibleMock(I18n\Cldr\CldrModel::class, ['getRawArray'], [['fake/path']]);
        $mockModel->expects($this->once())->method('getRawArray')->with('plurals')->will($this->returnValue($samplePluralRulesData));
        $mockRepository = $this->createMock(I18n\Cldr\CldrRepository::class);
        $mockRepository->expects($this->once())->method('getModel')->with('supplemental/plurals')->will($this->returnValue($mockModel));
        $mockCache = $this->getMockBuilder(VariableFrontend::class)->disableOriginalConstructor()->getMock();
        $mockCache->expects($this->at(0))->method('has')->with('rulesets')->will($this->returnValue(false));
        $mockCache->expects($this->at(1))->method('set')->with('rulesets');
        $mockCache->expects($this->at(2))->method('set')->with('rulesetsIndices');
        $this->reader = new PluralsReader();
        $this->reader->injectCldrRepository($mockRepository);
        $this->reader->injectCache($mockCache);
        $this->reader->initializeObject();
    }