-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathphpunit120.php
More file actions
33 lines (28 loc) · 1.55 KB
/
phpunit120.php
File metadata and controls
33 lines (28 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\PHPUnit\PHPUnit120\Rector\CallLike\CreateStubInCoalesceArgRector;
use Rector\PHPUnit\PHPUnit120\Rector\CallLike\CreateStubOverCreateMockArgRector;
use Rector\PHPUnit\PHPUnit120\Rector\Class_\AllowMockObjectsForDataProviderRector;
use Rector\PHPUnit\PHPUnit120\Rector\Class_\AllowMockObjectsWhereParentClassRector;
use Rector\PHPUnit\PHPUnit120\Rector\Class_\AllowMockObjectsWithoutExpectationsAttributeRector;
use Rector\PHPUnit\PHPUnit120\Rector\Class_\AssertIsTypeMethodCallRector;
use Rector\PHPUnit\PHPUnit120\Rector\Class_\PropertyCreateMockToCreateStubRector;
use Rector\PHPUnit\PHPUnit120\Rector\Class_\RemoveOverrideFinalConstructTestCaseRector;
use Rector\PHPUnit\PHPUnit120\Rector\ClassMethod\ExpressionCreateMockToCreateStubRector;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rules([
RemoveOverrideFinalConstructTestCaseRector::class,
AssertIsTypeMethodCallRector::class,
// stubs over mocks
CreateStubOverCreateMockArgRector::class,
CreateStubInCoalesceArgRector::class,
ExpressionCreateMockToCreateStubRector::class,
PropertyCreateMockToCreateStubRector::class,
AllowMockObjectsWhereParentClassRector::class,
AllowMockObjectsForDataProviderRector::class,
// experimental, from PHPUnit 12.5.2
// @see https://github.com/sebastianbergmann/phpunit/commit/24c208d6a340c3071f28a9b5cce02b9377adfd43
AllowMockObjectsWithoutExpectationsAttributeRector::class,
]);
};