Skip to content

Commit

Permalink
Fix phpunit deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Aug 1, 2024
1 parent 8e0d013 commit 3e6bfa1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@
}
],
"require": {
"php": "^7.4|^8.0",
"phplrt/source-contracts": "^3.6",
"symfony/deprecation-contracts": "^2.5|^3.0",
"symfony/polyfill-php80": "^1.29"
"php": "^8.1",
"phplrt/source-contracts": "^4.0",
"symfony/deprecation-contracts": "^2.5|^3.0"
},
"autoload": {
"psr-4": {
"Phplrt\\Source\\": "src"
}
},
"require-dev": {
"phpunit/phpunit": "^9.6|^10.0",
"phpunit/phpunit": "^10.5|^11.0",
"psr/http-message": "^1.0|^2.0",
"httpsoft/http-message": "^1.1",
"phpstan/extension-installer": "^1.4",
Expand All @@ -40,12 +39,12 @@
}
},
"provide": {
"phplrt/source-contracts-implementation": "^3.6"
"phplrt/source-contracts-implementation": "^4.0"
},
"extra": {
"branch-alias": {
"dev-master": "3.x-dev",
"dev-main": "3.x-dev"
"dev-master": "4.x-dev",
"dev-main": "4.x-dev"
}
},
"config": {
Expand Down
17 changes: 5 additions & 12 deletions tests/Unit/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,27 @@

use Phplrt\Contracts\Source\FileInterface;
use Phplrt\Contracts\Source\ReadableInterface;
use PHPUnit\Framework\Attributes\DataProvider;

class FileTest extends TestCase
{
/**
* @dataProvider provider
*/
#[DataProvider('provider')]
public function testSources(\Closure $factory): void
{
$readable = $factory();

$this->assertSame($this->getSources(), $readable->getContents());
}

/**
* @dataProvider provider
*/
#[DataProvider('provider')]
public function testCloneable(\Closure $factory): void
{
$readable = $factory();

$this->assertSame($this->getSources(), (clone $readable)->getContents());
}

/**
* @dataProvider provider
*/
#[DataProvider('provider')]
public function testSerializable(\Closure $factory): void
{
$readable = $factory();
Expand All @@ -48,9 +43,7 @@ public static function filesDataProvider(): array
return \array_filter(static::provider(), $filter);
}

/**
* @dataProvider filesDataProvider
*/
#[DataProvider('filesDataProvider')]
public function testPathname(\Closure $factory): void
{
/** @var ReadableInterface $readable */
Expand Down

0 comments on commit 3e6bfa1

Please sign in to comment.