From a499e081670e91733183cfbef4dab08a8f0471b9 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 22 Jun 2024 10:46:56 -0400 Subject: [PATCH] update unit tests --- tests/Unit/ResourceLimitsTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Unit/ResourceLimitsTest.php b/tests/Unit/ResourceLimitsTest.php index 84a0864..1e656fd 100644 --- a/tests/Unit/ResourceLimitsTest.php +++ b/tests/Unit/ResourceLimitsTest.php @@ -8,7 +8,7 @@ $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 () { @@ -16,7 +16,7 @@ $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 () { @@ -24,7 +24,7 @@ $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 () { @@ -32,7 +32,7 @@ $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 () {