Skip to content

Commit

Permalink
Bump to PHPUnit 10 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Jun 19, 2023
1 parent 1b33a8c commit d81c73f
Show file tree
Hide file tree
Showing 27 changed files with 65 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
composer.lock


.phpunit.result.cache
.phpunit.cache
17 changes: 8 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
"require": {
"php": ">=8.1",
"nette/utils": "^3.2",
"friendsofphp/php-cs-fixer": "^3.13",
"friendsofphp/php-cs-fixer": "^3.18",
"symplify/rule-doc-generator-contracts": "^11.1"
},
"require-dev": {
"symplify/easy-coding-standard": "^11.1",
"symfony/framework-bundle": "6.1.*",
"symplify/easy-coding-standard": "^11.4",
"squizlabs/php_codesniffer": "^3.7.1",
"phpunit/phpunit": "^9.5.26",
"phpunit/phpunit": "^10.2",
"symplify/rule-doc-generator": "^11.1",
"cweagans/composer-patches": "^1.7",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.9",
"rector/rector": "*",
"symplify/easy-ci": "^11.1",
"symplify/phpstan-extensions": "^11.1"
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10.19",
"rector/rector": "^0.17.1",
"symplify/easy-ci": "^11.2",
"symplify/phpstan-extensions": "^11.2"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 4 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="tests/bootstrap.php"
colors="true"
verbose="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd"
cacheDirectory=".phpunit.cache"
>
<testsuite name="all">
<directory>tests</directory>
Expand Down
1 change: 1 addition & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
SetList::PRIVATIZATION,
SetList::EARLY_RETURN,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_100,
]);

$rectorConfig->paths([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\Annotation\RemovePHPStormAnnotationFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class RemovePHPStormAnnotationFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\ArrayNotation\ArrayListItemNewlineFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class ArrayListItemNewlineFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class ArrayOpenerAndCloserNewlineFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class StandaloneLineInMultilineArrayFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class StandaloneLineInMultilineArrayFixerTestPhp80Test extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/FixturePhp80');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
namespace Symplify\CodingStandard\Tests\Fixer\Commenting\ParamReturnAndVarTagMalformsFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

/**
* @mimic https://github.com/rectorphp/rector/pull/807/files
*/
final class ParamReturnAndVarTagMalformsFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\Commenting\RemoveUselessDefaultCommentFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class RemoveUselessDefaultCommentFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\LineLength\LineLengthFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class ArrayLineLengthFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/FixtureArray');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\LineLength\LineLengthFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class ConfiguredLineLengthFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/FixtureConfigured');
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\LineLength\LineLengthFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class LineLengthFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\Spacing\MethodChainingNewlineFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class MethodChainingNewlineFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\Spacing\SpaceAfterCommaHereNowDocFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class SpaceAfterCommaHereNowDocFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\Spacing\StandaloneLineConstructorParamFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class StandaloneLineConstructorParamFixerContraindicationsTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/FixtureContraindications');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
namespace Symplify\CodingStandard\Tests\Fixer\Spacing\StandaloneLineConstructorParamFixer;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\EasyCodingStandard\Testing\PHPUnit\AbstractCheckerTestCase;

final class StandaloneLineConstructorParamFixerTest extends AbstractCheckerTestCase
{
/**
* @dataProvider provideData()
*/
#[DataProvider('provideData')]
public function test(string $filePath): void
{
$this->doTestFile($filePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
return self::yieldFiles(__DIR__ . '/Fixture');
}
Expand Down
Loading

0 comments on commit d81c73f

Please sign in to comment.