1<?php declare(strict_types=1); 2 3namespace PhpParser; 4 5/* This test is very weak, because PHPUnit's assertEquals assertion is way too slow dealing with the 6 * large objects involved here. So we just do some basic instanceof tests instead. */ 7 8use PhpParser\Parser\Php7; 9use PhpParser\Parser\Php8; 10 11class ParserFactoryTest extends \PHPUnit\Framework\TestCase { 12 public function testCreate(): void { 13 $factory = new ParserFactory(); 14 $this->assertInstanceOf(Php8::class, $factory->createForNewestSupportedVersion()); 15 $this->assertInstanceOf(Parser::class, $factory->createForHostVersion()); 16 } 17} 18