public function testGlobalVariablesInLoadedFileAppearInGlobalScope() { $this->assertTrue(!isset($GLOBALS['testVar'])); // BIG FAT NOTE: // // We *have* to load a different class here, because DummyClass1 // has already been loaded, and cannot be loaded again $fileLoader = new FileLoader(); $newClasses = $fileLoader->loadPhpFile(__DIR__ . '/DummyClass2.php'); $this->assertTrue(isset($GLOBALS['testVar'])); $this->assertEquals('trout', $GLOBALS['testVar']); }