Kraken\_Module\Filesystem\_Partial\Filesystem\FsApiAppendPartial::testApiAppend_AppendsToFile_WhenNodeIsFile PHP Method

testApiAppend_AppendsToFile_WhenNodeIsFile() public method

    public function testApiAppend_AppendsToFile_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->append($dest, $after);
        $test->assertTrue($fs->exists($dest));
        $test->assertSame($before . $after, $fs->read($dest));
    }