Kraken\_Module\Filesystem\_Partial\Filesystem\FsApiWritePartial::testApiWrite_WritesFile_WhenNodeIsFile PHP Method

testApiWrite_WritesFile_WhenNodeIsFile() public method

    public function testApiWrite_WritesFile_WhenNodeIsFile()
    {
        $test = $this->getTest();
        $fs = $this->createFilesystem();
        $dest = $this->getPrefixed('FILE_A');
        $before = 'FILE_A_TEXT';
        $after = 'FILE_A_NEW_TEXT';
        $test->assertTrue($fs->exists($dest));
        $test->assertSame($before, $fs->read($dest));
        $fs->write($dest, $after);
        $test->assertTrue($fs->exists($dest));
        $test->assertSame($after, $fs->read($dest));
    }