getProperty('configManager'); $property->setAccessible(true); $property->setValue($value); } /** * @throws ReflectionException */ public function testGetConfigManager() { $ref = new \ReflectionClass(Config::class); $method = $ref->getMethod('getConfigManager'); $method->setAccessible(true); self::assertInstanceOf(ConfigManager::class, $method->invoke(null)); } /** * @depends testGetConfigManager * @throws ReflectionException * @throws Exception */ public function testSetAndGet() { self::setStaticProperty(new ConfigManager(self::file()->url())); Config::set('vfs', __METHOD__); self::assertEquals(Config::get('vfs'), __METHOD__); } /** * @return vfsStreamFile|string */ private static function file() { if (self::$vfs !== null) { return self::$vfs; } $content = <<withContent($content) ->at($root); return self::$vfs; } }