[Filesystem] Added a missing test case for Filesystem::dumpFile().
This commit is contained in:
parent
b13af94e01
commit
8fcf4c2d8a
@ -883,6 +883,17 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testDumpFile()
|
||||
{
|
||||
$filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
|
||||
|
||||
$this->filesystem->dumpFile($filename, 'bar', 0753);
|
||||
|
||||
$this->assertFileExists($filename);
|
||||
$this->assertSame('bar', file_get_contents($filename));
|
||||
$this->assertEquals(753, $this->getFilePermissions($filename));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns file permissions as three digits (i.e. 755)
|
||||
*
|
||||
|
Reference in New Issue
Block a user