protected function setUp() { $fileName = stream_resolve_include_path(__DIR__ . self::STUB_FILE); $fileNode = ReflectionEngine::parseFile($fileName); $reflectionFile = new ReflectionFile($fileName, $fileNode); $this->parsedRefFile = $reflectionFile; include_once $fileName; }
protected function setUp() { $fileName = stream_resolve_include_path(__DIR__ . self::STUB_FILE); $fileNode = ReflectionEngine::parseFile($fileName); $reflectionFile = new ReflectionFile($fileName, $fileNode); $parsedFileNamespace = $reflectionFile->getFileNamespace('Go\\ParserReflection\\Stub'); $this->parsedRefFileNamespace = $parsedFileNamespace; include_once $fileName; }
/** * Tests specific features of PHP5.6 and newer, for example, array constants, etc */ public function testGettersPHP56() { if (PHP_VERSION_ID < 50600) { $this->markTestSkipped("Can not test new features on old version of PHP"); } $fileName = stream_resolve_include_path(__DIR__ . self::STUB_FILE56); $fileNode = ReflectionEngine::parseFile($fileName); $reflectionFile = new ReflectionFile($fileName, $fileNode); include_once $fileName; $parsedFileNamespace = $reflectionFile->getFileNamespace('Go\\ParserReflection\\Stub'); foreach ($parsedFileNamespace->getClasses() as $parsedRefClass) { $this->performGeneralMethodComparison($parsedRefClass); } }