Skip to content

Commit

Permalink
Removes the GMP case from the data provider
Browse files Browse the repository at this point in the history
The test is checking for exceptional situations for non-stream resources and given the other cases are more likely to run (i.e. GMP is probably not installed), it's not worth the psalm errors

Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jul 6, 2022
1 parent defeaf5 commit 4f7b49b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions test/StreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace LaminasTest\Diactoros;

use GMP;
use InvalidArgumentException;
use Laminas\Diactoros\Stream;
use PHPUnit\Framework\TestCase;
Expand All @@ -22,7 +21,6 @@
use function ftok;
use function function_exists;
use function fwrite;
use function gmp_init;
use function imagecreate;
use function is_resource;
use function shmop_open;
Expand Down Expand Up @@ -624,7 +622,7 @@ public function testRaisesExceptionOnAttachForNonStreamResources(): void
$stream->attach($resource);
}

/** @return resource|false|GMP */
/** @return resource|false */
public function getResourceFor67()
{
if (function_exists('curl_init')) {
Expand All @@ -635,10 +633,6 @@ public function getResourceFor67()
return shmop_open(ftok(__FILE__, 't'), 'c', 0644, 100);
}

if (function_exists('gmp_init')) {
return gmp_init(1);
}

if (function_exists('imagecreate')) {
return imagecreate(200, 200);
}
Expand Down

0 comments on commit 4f7b49b

Please sign in to comment.