X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FParserFactoryTest.php;fp=vendor%2Fnikic%2Fphp-parser%2Ftest%2FPhpParser%2FParserFactoryTest.php;h=49c01115e0ab6064fa080644fd6130ee25cf7d3a;hp=0000000000000000000000000000000000000000;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php new file mode 100644 index 000000000..49c01115e --- /dev/null +++ b/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php @@ -0,0 +1,34 @@ +assertInstanceOf($expected, (new ParserFactory)->create($kind, $lexer)); + } + + public function provideTestCreate() { + $lexer = new Lexer(); + return [ + [ + ParserFactory::PREFER_PHP7, $lexer, + 'PhpParser\Parser\Multiple' + ], + [ + ParserFactory::PREFER_PHP5, null, + 'PhpParser\Parser\Multiple' + ], + [ + ParserFactory::ONLY_PHP7, null, + 'PhpParser\Parser\Php7' + ], + [ + ParserFactory::ONLY_PHP5, $lexer, + 'PhpParser\Parser\Php5' + ] + ]; + } +} \ No newline at end of file