Skip to content

Commit

Permalink
Merge branch '1.9.x' into 2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
azjezz committed Nov 10, 2021
2 parents f28713d + de6f130 commit 3200e5b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/Filesystem/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ public function testWriteFile(): void
Filesystem\delete_file($file);
}

public function testWriteFileClearsFileStat(): void
{
$file = Filesystem\create_temporary_file();

Filesystem\write_file($file, 'Hello');

static::assertSame(5, Filesystem\file_size($file));

Filesystem\append_file($file, ', World!');

static::assertSame(13, Filesystem\file_size($file));

Filesystem\delete_file($file);
}

public function testWriteFileThrowsForDirectories(): void
{
$this->expectException(InvariantViolationException::class);
Expand Down

0 comments on commit 3200e5b

Please sign in to comment.