/** * setUpBeforeClass * * @since 3.0.0 */ public static function setUpBeforeClass() { $rootDirectory = new Directory(); $rootDirectory->init('.'); $rootDirectory->create('.restore'); $rootDirectory->put('.restore/test.sql', '/* test */'); }
/** * testPut * * @since 3.0.0 * * @param string $path * @param array $putArray * @param string $expect * * @dataProvider providerPut */ public function testPut($path = null, $putArray = [], $expect = null) { /* setup */ $directory = new Directory(); $directory->init(Stream::url($path)); $directory->put($putArray[0], $putArray[1]); /* actual */ $actual = file_get_contents(Stream::url($path . '/' . $putArray[0])); /* compare */ $this->assertEquals($expect, $actual); }