function ResourceStreamTestCase::testFilePutGetContents in D7 Media 6
File
- resource/
tests/ ResourceStream.test, line 109 - This provides SimpleTests for the core stream wrapper functionality.
Class
- ResourceStreamTestCase
- Base class for file tests that adds some additional file specific assertions and helper functions.
Code
function testFilePutGetContents() {
$data = 'fedcba0987654321';
$this
->assertTrue(file_put_contents($this->scheme . $this->path, $data), "file_put_contents({$data})");
$read = file_get_contents($this->scheme . $this->path);
$this
->assertTrue($data == $read, "file_get_contents ({$read}) == file_put_contents ({$data}) bytes");
}