Fix bug in parser when there are hidden chars at beginning of pgn

This commit is contained in:
Alf Magne Kalleland
2019-07-06 22:05:35 +02:00
parent 1586531863
commit d3773ab4fb
3 changed files with 3160 additions and 0 deletions

View File

@@ -2691,5 +2691,20 @@ $pgn = '[Event "URS-ch23"]
}
/**
* @test
*/
public function shouldImportAllGames(){
$pgn = file_get_contents("pgn/philadelphiainternational2019.pgn");
// when
$parser = new PgnParser();
$parser->setPgnContent($pgn);
$content = $parser->getUnparsedGames();
// when
// then
$this->assertEquals(132, $parser->countGames());
}
}