1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-22 13:32:56 +02:00

Add File::fromPath()

This commit is contained in:
Oliver Vogel
2025-01-02 15:59:36 +01:00
parent 2a62d490cc
commit c7ec22602c
3 changed files with 20 additions and 0 deletions

View File

@@ -32,6 +32,13 @@ final class FileTest extends BaseTestCase
$this->assertInstanceOf(File::class, $file);
}
public function testFromPath(): void
{
$file = File::fromPath($this->getTestResourcePath());
$this->assertInstanceOf(File::class, $file);
$this->assertTrue($file->size() > 0);
}
public function testSave(): void
{
$filename = __DIR__ . '/file_' . strval(hrtime(true)) . '.test';