Kraken\_Module\Filesystem\_Partial\Filesystem\FsApiCreateFilePartial::testApiCreateFile_ReplacesNode_WhenNodeIsFile PHP Method

testApiCreateFile_ReplacesNode_WhenNodeIsFile() public method

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