/**
* @test
* @dataProvider sampleNumbersEasyToParse
*/
public function parsingUsingCustomPatternWorks($formatType, $numberToParse, $expectedParsedNumber, $stringFormat, array $parsedFormat)
{
$mockNumbersReader = $this->createMock(I18n\Cldr\Reader\NumbersReader::class);
$mockNumbersReader->expects($this->once())->method('parseCustomFormat')->with($stringFormat)->will($this->returnValue($parsedFormat));
$mockNumbersReader->expects($this->once())->method('getLocalizedSymbolsForLocale')->with($this->sampleLocale)->will($this->returnValue($this->sampleLocalizedSymbols));
$parser = new I18n\Parser\NumberParser();
$parser->injectNumbersReader($mockNumbersReader);
$result = $parser->parseNumberWithCustomPattern($numberToParse, $stringFormat, $this->sampleLocale, true);
$this->assertEquals($expectedParsedNumber, $result);
}