1
0
Fork 0
mirror of synced 2024-06-25 17:50:38 +12:00

Added file type tests

This commit is contained in:
Eldad Fux 2019-12-26 21:44:12 +02:00
parent a9a9b379dc
commit 83a2f0bebe
3 changed files with 30 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View file

@ -0,0 +1,30 @@
<?php
namespace Appwrite\Tests;
use Storage\Validators\FileType;
use PHPUnit\Framework\TestCase;
class FileTypeTest extends TestCase
{
/**
* @var FileType
*/
protected $object = null;
public function setUp()
{
$this->object = new FileType([FileType::FILE_TYPE_JPEG]);
}
public function tearDown()
{
}
public function testValues()
{
$this->assertEquals($this->object->isValid(__DIR__ . '/../../../resources/disk-a/kitten-1.jpg'), true);
$this->assertEquals($this->object->isValid(__DIR__ . '/../../../resources/disk-a/kitten-2.jpg'), true);
$this->assertEquals($this->object->isValid(__DIR__ . '/../../../resources/disk-a/kitten-2.jpg'), true);
}
}