Skip to content

Commit

Permalink
Merge pull request #185 from t0mmy742/no_more_phpunit_warning
Browse files Browse the repository at this point in the history
Fixed PHPUnit warning for deprecated method
  • Loading branch information
l0gicgate committed Apr 27, 2021
2 parents b8a8bb9 + c972f9e commit 78a2f6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
"ralouphie/getallheaders": "^3",
"symfony/polyfill-php80": "^1.20"
"symfony/polyfill-php80": "^1.22"
},
"require-dev": {
"ext-json": "*",
"adriansuter/php-autoload-override": "^1.2",
"http-interop/http-factory-tests": "^0.9.0",
"php-http/psr7-integration-tests": "dev-master",
"phpstan/phpstan": "^0.12",
"phpunit/phpunit": "^8.5 || ^9.3",
"phpunit/phpunit": "^8.5 || ^9.5",
"squizlabs/php_codesniffer": "^3.5",
"weirdan/prophecy-shim": "^1.0 || ^2.0.2"
},
Expand Down
8 changes: 7 additions & 1 deletion tests/UploadedFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use PHPUnit\Runner\Version;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UploadedFileInterface;
Expand All @@ -36,6 +37,7 @@
use function sys_get_temp_dir;
use function uniqid;
use function unlink;
use function version_compare;

use const DIRECTORY_SEPARATOR;
use const UPLOAD_ERR_CANT_WRITE;
Expand Down Expand Up @@ -358,7 +360,11 @@ public function testMoveToStream()
$movedFileContents = ob_get_clean();

$this->assertEquals($contents, $movedFileContents);
$this->assertFileNotExists($fileName);
if (version_compare(Version::series(), '9.1', '>=')) {
$this->assertFileDoesNotExist($fileName);
} else {
$this->assertFileNotExists($fileName);
}
}

/**
Expand Down

0 comments on commit 78a2f6e

Please sign in to comment.