QuotaTestCase.php in Zircon Profile 8.0
File
vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/QuotaTestCase.php
View source
<?php
namespace org\bovigo\vfs;
class QuotaTestCase extends \PHPUnit_Framework_TestCase {
private $quota;
public function setUp() {
$this->quota = new Quota(10);
}
public function unlimitedQuotaIsNotLimited() {
$this
->assertFalse(Quota::unlimited()
->isLimited());
}
public function limitedQuotaIsLimited() {
$this
->assertTrue($this->quota
->isLimited());
}
public function unlimitedQuotaHasAlwaysSpaceLeft() {
$this
->assertEquals(303, Quota::unlimited()
->spaceLeft(303));
}
public function hasNoSpaceLeftWhenUsedSpaceIsLargerThanQuota() {
$this
->assertEquals(0, $this->quota
->spaceLeft(11));
}
public function hasNoSpaceLeftWhenUsedSpaceIsEqualToQuota() {
$this
->assertEquals(0, $this->quota
->spaceLeft(10));
}
public function hasSpaceLeftWhenUsedSpaceIsLowerThanQuota() {
$this
->assertEquals(1, $this->quota
->spaceLeft(9));
}
}