1
0
Fork 0
mirror of synced 2024-07-17 12:25:55 +12:00
appwrite/tests/unit/Storage/Validator/FileSizeTest.php

31 lines
597 B
PHP
Raw Normal View History

2019-12-27 06:25:59 +13:00
<?php
namespace Appwrite\Tests;
2020-06-12 07:36:10 +12:00
use Appwrite\Storage\Validator\FileSize;
2019-12-27 06:25:59 +13:00
use PHPUnit\Framework\TestCase;
class FileSizeTest extends TestCase
{
/**
* @var FileSize
*/
protected $object = null;
2020-10-01 10:55:19 +13:00
public function setUp(): void
2019-12-27 06:25:59 +13:00
{
$this->object = new FileSize(1000);
}
2020-10-01 10:55:19 +13:00
public function tearDown(): void
2019-12-27 06:25:59 +13:00
{
}
public function testValues()
{
$this->assertEquals($this->object->isValid(1001), false);
$this->assertEquals($this->object->isValid(1000), true);
$this->assertEquals($this->object->isValid(999), true);
}
2020-10-01 10:55:19 +13:00
}