public function testConstructionWithManualBaseDirectory() { $tempPath = sprintf('%s/%s/sub-dir', sys_get_temp_dir(), $this->getName()); $filePath = sprintf('%s/test.file', $tempPath); @mkdir($tempPath, 0775, true); touch($filePath); $file = new SolutionFile('test.file', $tempPath); $this->assertSame($filePath, $file->__toString()); $this->assertSame('test.file', $file->getRelativePath()); $this->assertSame($tempPath, $file->getBaseDirectory()); $this->assertSame('', $file->getContents()); unlink($filePath); rmdir($tempPath); }
/** * @return string */ public function getBaseDirectory() { return $this->file->getBaseDirectory(); }