8000 merged branch jakzal/dumpfile-tests (PR #7801) · symfony/symfony@9f3ce8e · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f3ce8e

Browse files
committed
merged branch jakzal/dumpfile-tests (PR #7801)
This PR was merged into the master branch. Discussion ---------- [Filesystem] Added a missing test case for Filesystem::dumpFile() This PR adds a test case for the ``Filesystem::dumpFile()`` method (introduced in #7753). | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | [![Build Status](https://travis-ci.org/jakzal/symfony.png?branch=dumpfile-tests)](https://travis-ci.org/jakzal/symfony) | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 8fcf4c2 [Filesystem] Added a missing test case for Filesystem::dumpFile().
2 parents 9cdd1c7 + 8fcf4c2 commit 9f3ce8e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,17 @@ public function providePathsForIsAbsolutePath()
883883
);
884884
}
885885

886+
public function testDumpFile()
887+
{
888+
$filename = $this->workspace.DIRECTORY_SEPARATOR.'foo'.DIRECTORY_SEPARATOR.'baz.txt';
889+
890+
$this->filesystem->dumpFile($filename, 'bar', 0753);
891+
892+
$this->assertFileExists($filename);
893+
$this->assertSame('bar', file_get_contents($filename));
894+
$this->assertEquals(753, $this->getFilePermissions($filename));
895+
}
896+
886897
/**
887898
* Returns file permissions as three digits (i.e. 755)
888899
*

0 commit comments

Comments
 (0)
0