Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patinthehat committed Jun 22, 2024
1 parent 1c8b763 commit a499e08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Unit/ResourceLimitsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@
$im = $pdf->resourceLimit(ResourceLimitType::Area, 1024 * 1024 * 128)
->getImageData($this->testFile, 1);

expect((int) $im::getResourceLimit(ResourceLimitType::Area->value))->toBe((int) 1024 * 1024 * 128);
expect((int) $im::getResourceLimit(ResourceLimitType::Area->value))->toBeGreaterThanOrEqual((int) 1024 * 1024 * 128);
});

it('sets the disk resource limit', function () {
$pdf = new Pdf($this->testFile);
$im = $pdf->resourceLimit(ResourceLimitType::Disk, 1024 * 1024 * 128)
->getImageData($this->testFile, 1);

expect((int) $im::getResourceLimit(ResourceLimitType::Disk->value))->toBe((int) 1024 * 1024 * 128);
expect((int) $im::getResourceLimit(ResourceLimitType::Disk->value))->toBeGreaterThanOrEqual((int) 1024 * 1024 * 128);
});

it('sets the map resource limit', function () {
$pdf = new Pdf($this->testFile);
$im = $pdf->resourceLimit(ResourceLimitType::Map, 1024 * 1024 * 128)
->getImageData($this->testFile, 1);

expect((int) $im::getResourceLimit(ResourceLimitType::Map->value))->toBe((int) 1024 * 1024 * 128);
expect((int) $im::getResourceLimit(ResourceLimitType::Map->value))->toBeGreaterThanOrEqual((int) 1024 * 1024 * 128);
});

it('sets the memory resource limit', function () {
$pdf = new Pdf($this->testFile);
$im = $pdf->resourceLimit(ResourceLimitType::Memory, 1024 * 1024 * 128)
->getImageData($this->testFile, 1);

expect((int) $im::getResourceLimit(ResourceLimitType::Memory->value))->toBe((int) 1024 * 1024 * 128);
expect((int) $im::getResourceLimit(ResourceLimitType::Memory->value))->toBeGreaterThanOrEqual((int) 1024 * 1024 * 128);
});

it('sets the time resource limit', function () {
Expand Down

0 comments on commit a499e08

Please sign in to comment.