public function testRegisterFileValid() { $tmp = $this->createGoodTmpFile(); $instance = YamlDriver::create([sys_get_temp_dir() . '/' . basename($tmp)]); $classes = $instance->getAllClassNames(); $this->assertSame($classes, ['DrestTests\\Entities\\NoAnnotation\\User']); }
/** * Registers a custom temporary file * @param temporary file $tmp */ public function registerTmpFile($tmp) { $configuration = new Configuration(); $configuration->setAttribute('configFilePath', sys_get_temp_dir()); $configuration->setAttribute('configFileName', basename($tmp)); YamlDriver::register($configuration); }