mirror of
https://github.com/Intervention/image.git
synced 2025-01-17 12:18:14 +01:00
18 lines
519 B
PHP
18 lines
519 B
PHP
<?php
|
|
|
|
use Intervention\Image\File;
|
|
|
|
class FileTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
public function testSetFileInfoFromPath()
|
|
{
|
|
$file = new File;
|
|
$file->setFileInfoFromPath('tests/images/test.jpg');
|
|
$this->assertEquals('tests/images', $file->dirname);
|
|
$this->assertEquals('test.jpg', $file->basename);
|
|
$this->assertEquals('jpg', $file->extension);
|
|
$this->assertEquals('test', $file->filename);
|
|
$this->assertEquals('image/jpeg', $file->mime);
|
|
}
|
|
}
|