Symfony\Component\Intl\Tests\Data\Bundle\Reader\BundleEntryReaderTest::testMergeDataWithFallbackData PHP Method

testMergeDataWithFallbackData() public method

public testMergeDataWithFallbackData ( $childData, $parentData, $result )
    public function testMergeDataWithFallbackData($childData, $parentData, $result)
    {
        if (null === $childData || is_array($childData)) {
            $this->readerImpl->expects($this->at(0))
                ->method('read')
                ->with(self::RES_DIR, 'en')
                ->will($this->returnValue($childData));

            $this->readerImpl->expects($this->at(1))
                ->method('read')
                ->with(self::RES_DIR, 'root')
                ->will($this->returnValue($parentData));
        } else {
            $this->readerImpl->expects($this->once())
                ->method('read')
                ->with(self::RES_DIR, 'en')
                ->will($this->returnValue($childData));
        }

        $this->assertSame($result, $this->reader->readEntry(self::RES_DIR, 'en', array(), true));
    }