Skip to content

Commit 755bd66

Browse files
frankdejongeondrejmirtes
authored andcommitted
[BCB] Renamed TestCase to PHPStanTestCase
1 parent 44ba333 commit 755bd66

File tree

78 files changed

+97
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+97
-97
lines changed

compiler/build/scoper.inc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function (string $filePath, string $prefix, string $content): string {
8080
return $content;
8181
},
8282
function (string $filePath, string $prefix, string $content): string {
83-
if ($filePath !== 'src/Testing/TestCase.php') {
83+
if ($filePath !== 'src/Testing/PHPStanTestCase.php') {
8484
return $content;
8585
}
8686
return str_replace(sprintf('\\%s\\PHPUnit\\Framework\\TestCase', $prefix), '\\PHPUnit\\Framework\\TestCase', $content);
@@ -160,7 +160,7 @@ function (string $filePath, string $prefix, string $content): string {
160160
function (string $filePath, string $prefix, string $content): string {
161161
if (!in_array($filePath, [
162162
'src/Testing/TestCaseSourceLocatorFactory.php',
163-
'src/Testing/TestCase.php',
163+
'src/Testing/PHPStanTestCase.php',
164164
], true)) {
165165
return $content;
166166
}

phpcs.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</rule>
5353
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure.UnusedInheritedVariable">
5454
<exclude-pattern>src/Command/CommandHelper.php</exclude-pattern>
55-
<exclude-pattern>src/Testing/TestCase.php</exclude-pattern>
55+
<exclude-pattern>src/Testing/PHPStanTestCase.php</exclude-pattern>
5656
</rule>
5757
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException">
5858
<exclude-pattern>tests</exclude-pattern>

phpstan-baseline.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ parameters:
243243
-
244244
message: "#^Anonymous function has an unused use \\$container\\.$#"
245245
count: 1
246-
path: src/Testing/TestCase.php
246+
path: src/Testing/PHPStanTestCase.php
247247

248248
-
249249
message: "#^Unreachable statement \\- code above always terminates\\.$#"

src/Testing/ErrorFormatterTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\Console\Input\StringInput;
1212
use Symfony\Component\Console\Output\StreamOutput;
1313

14-
abstract class ErrorFormatterTestCase extends \PHPStan\Testing\TestCase
14+
abstract class ErrorFormatterTestCase extends \PHPStan\Testing\PHPStanTestCase
1515
{
1616

1717
protected const DIRECTORY_PATH = '/data/folder/with space/and unicode 😃/project';

src/Testing/TestCase.php renamed to src/Testing/PHPStanTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
use PHPStan\Type\TypeAliasResolver;
7777

7878
/** @api */
79-
abstract class TestCase extends \PHPUnit\Framework\TestCase
79+
abstract class PHPStanTestCase extends \PHPUnit\Framework\TestCase
8080
{
8181

8282
/** @var bool */

src/Testing/RuleTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @api
2929
* @template TRule of \PHPStan\Rules\Rule
3030
*/
31-
abstract class RuleTestCase extends \PHPStan\Testing\TestCase
31+
abstract class RuleTestCase extends \PHPStan\Testing\PHPStanTestCase
3232
{
3333

3434
private ?\PHPStan\Analyser\Analyser $analyser = null;

src/Testing/TypeInferenceTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
use PHPStan\Type\VerbosityLevel;
2929

3030
/** @api */
31-
abstract class TypeInferenceTestCase extends \PHPStan\Testing\TestCase
31+
abstract class TypeInferenceTestCase extends \PHPStan\Testing\PHPStanTestCase
3232
{
3333

3434
/**

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use const PHP_VERSION_ID;
1414
use function array_reverse;
1515

16-
class AnalyserIntegrationTest extends \PHPStan\Testing\TestCase
16+
class AnalyserIntegrationTest extends \PHPStan\Testing\PHPStanTestCase
1717
{
1818

1919
public function testUndefinedVariableFromAssignErrorHasLine(): void

tests/PHPStan/Analyser/AnalyserTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use PHPStan\Rules\Registry;
2424
use PHPStan\Type\FileTypeMapper;
2525

26-
class AnalyserTest extends \PHPStan\Testing\TestCase
26+
class AnalyserTest extends \PHPStan\Testing\PHPStanTestCase
2727
{
2828

2929
public function testReturnErrorIfIgnoredMessagesDoesNotOccur(): void

tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PHPStan\File\FileHelper;
66

7-
class AnalyserTraitsIntegrationTest extends \PHPStan\Testing\TestCase
7+
class AnalyserTraitsIntegrationTest extends \PHPStan\Testing\PHPStanTestCase
88
{
99

1010
/** @var \PHPStan\File\FileHelper */

tests/PHPStan/Analyser/ErrorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\Analyser;
44

5-
class ErrorTest extends \PHPStan\Testing\TestCase
5+
class ErrorTest extends \PHPStan\Testing\PHPStanTestCase
66
{
77

88
public function testError(): void

tests/PHPStan/Analyser/ScopeTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PhpParser\Node\Expr\ConstFetch;
66
use PhpParser\Node\Name\FullyQualified;
7-
use PHPStan\Testing\TestCase;
7+
use PHPStan\Testing\PHPStanTestCase;
88
use PHPStan\Type\Constant\ConstantArrayType;
99
use PHPStan\Type\Constant\ConstantBooleanType;
1010
use PHPStan\Type\Constant\ConstantIntegerType;
@@ -14,7 +14,7 @@
1414
use PHPStan\Type\UnionType;
1515
use PHPStan\Type\VerbosityLevel;
1616

17-
class ScopeTest extends TestCase
17+
class ScopeTest extends PHPStanTestCase
1818
{
1919

2020
public function dataGeneralize(): array

tests/PHPStan/Analyser/StatementResultTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use PHPStan\Type\MixedType;
1010
use PHPStan\Type\StringType;
1111

12-
class StatementResultTest extends \PHPStan\Testing\TestCase
12+
class StatementResultTest extends \PHPStan\Testing\PHPStanTestCase
1313
{
1414

1515
public function dataIsAlwaysTerminating(): array

tests/PHPStan/Analyser/TypeSpecifierContextTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\Analyser;
44

5-
class TypeSpecifierContextTest extends \PHPStan\Testing\TestCase
5+
class TypeSpecifierContextTest extends \PHPStan\Testing\PHPStanTestCase
66
{
77

88
public function dataContext(): array

tests/PHPStan/Analyser/TypeSpecifierTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
use PHPStan\Type\UnionType;
2828
use PHPStan\Type\VerbosityLevel;
2929

30-
class TypeSpecifierTest extends \PHPStan\Testing\TestCase
30+
class TypeSpecifierTest extends \PHPStan\Testing\PHPStanTestCase
3131
{
3232

3333
private const FALSEY_TYPE_DESCRIPTION = '0|0.0|\'\'|\'0\'|array()|false|null';

tests/PHPStan/Analyser/traitsCachingIssue/TraitsCachingIssueIntegrationTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
use PHPStan\File\FileHelper;
66
use PHPStan\File\FileReader;
7-
use PHPStan\Testing\TestCase;
7+
use PHPStan\Testing\PHPStanTestCase;
88
use RecursiveDirectoryIterator;
99
use RecursiveIteratorIterator;
1010
use function file_exists;
1111

1212
/**
1313
* @group exec
1414
*/
15-
class TraitsCachingIssueIntegrationTest extends TestCase
15+
class TraitsCachingIssueIntegrationTest extends PHPStanTestCase
1616
{
1717

1818
/** @var string|null */

tests/PHPStan/Broker/BrokerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use PHPStan\Reflection\SignatureMap\NativeFunctionReflectionProvider;
2323
use PHPStan\Type\FileTypeMapper;
2424

25-
class BrokerTest extends \PHPStan\Testing\TestCase
25+
class BrokerTest extends \PHPStan\Testing\PHPStanTestCase
2626
{
2727

2828
/** @var \PHPStan\Broker\Broker */

tests/PHPStan/Command/AnalyseApplicationIntegrationTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\Console\Output\StreamOutput;
1212
use Symfony\Component\Console\Style\SymfonyStyle;
1313

14-
class AnalyseApplicationIntegrationTest extends \PHPStan\Testing\TestCase
14+
class AnalyseApplicationIntegrationTest extends \PHPStan\Testing\PHPStanTestCase
1515
{
1616

1717
public function testExecuteOnAFile(): void

tests/PHPStan/Command/AnalyseCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* @group exec
1010
*/
11-
class AnalyseCommandTest extends \PHPStan\Testing\TestCase
11+
class AnalyseCommandTest extends \PHPStan\Testing\PHPStanTestCase
1212
{
1313

1414
/**

tests/PHPStan/Command/AnalysisResultTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace PHPStan\Command;
44

55
use PHPStan\Analyser\Error;
6-
use PHPStan\Testing\TestCase;
6+
use PHPStan\Testing\PHPStanTestCase;
77

8-
final class AnalysisResultTest extends TestCase
8+
final class AnalysisResultTest extends PHPStanTestCase
99
{
1010

1111
public function testErrorsAreSortedByFileNameAndLine(): void

tests/PHPStan/Command/IgnoredRegexValidatorTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
namespace PHPStan\Command;
44

55
use PHPStan\PhpDoc\TypeStringResolver;
6-
use PHPStan\Testing\TestCase;
6+
use PHPStan\Testing\PHPStanTestCase;
77

8-
class IgnoredRegexValidatorTest extends TestCase
8+
class IgnoredRegexValidatorTest extends PHPStanTestCase
99
{
1010

1111
public function dataValidate(): array

tests/PHPStan/File/FileExcluderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\File;
44

5-
class FileExcluderTest extends \PHPStan\Testing\TestCase
5+
class FileExcluderTest extends \PHPStan\Testing\PHPStanTestCase
66
{
77

88
/**

tests/PHPStan/File/FileHelperTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\File;
44

5-
class FileHelperTest extends \PHPStan\Testing\TestCase
5+
class FileHelperTest extends \PHPStan\Testing\PHPStanTestCase
66
{
77

88
/**

tests/PHPStan/Generics/TemplateTypeFactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use PHPStan\Type\UnionType;
1515
use PHPStan\Type\VerbosityLevel;
1616

17-
class TemplateTypeFactoryTest extends \PHPStan\Testing\TestCase
17+
class TemplateTypeFactoryTest extends \PHPStan\Testing\PHPStanTestCase
1818
{
1919

2020
/** @return array<array{?Type, Type}> */

tests/PHPStan/Parser/CachedParserTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
use PhpParser\Node\Stmt\Namespace_;
66
use PHPStan\File\FileReader;
7-
use PHPStan\Testing\TestCase;
7+
use PHPStan\Testing\PHPStanTestCase;
88

9-
class CachedParserTest extends TestCase
9+
class CachedParserTest extends PHPStanTestCase
1010
{
1111

1212
/**

tests/PHPStan/Reflection/Annotations/AnnotationsMethodsClassReflectionExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use PHPStan\Reflection\Php\PhpMethodReflection;
1010
use PHPStan\Type\VerbosityLevel;
1111

12-
class AnnotationsMethodsClassReflectionExtensionTest extends \PHPStan\Testing\TestCase
12+
class AnnotationsMethodsClassReflectionExtensionTest extends \PHPStan\Testing\PHPStanTestCase
1313
{
1414

1515
public function dataMethods(): array

tests/PHPStan/Reflection/Annotations/AnnotationsPropertiesClassReflectionExtensionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PHPStan\Broker\Broker;
77
use PHPStan\Type\VerbosityLevel;
88

9-
class AnnotationsPropertiesClassReflectionExtensionTest extends \PHPStan\Testing\TestCase
9+
class AnnotationsPropertiesClassReflectionExtensionTest extends \PHPStan\Testing\PHPStanTestCase
1010
{
1111

1212
public function dataProperties(): array

tests/PHPStan/Reflection/Annotations/DeprecatedAnnotationsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Broker\Broker;
88

9-
class DeprecatedAnnotationsTest extends \PHPStan\Testing\TestCase
9+
class DeprecatedAnnotationsTest extends \PHPStan\Testing\PHPStanTestCase
1010
{
1111

1212
public function dataDeprecatedAnnotations(): array

tests/PHPStan/Reflection/Annotations/FinalAnnotationsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Broker\Broker;
88

9-
class FinalAnnotationsTest extends \PHPStan\Testing\TestCase
9+
class FinalAnnotationsTest extends \PHPStan\Testing\PHPStanTestCase
1010
{
1111

1212
public function dataFinalAnnotations(): array

tests/PHPStan/Reflection/Annotations/InternalAnnotationsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Broker\Broker;
88

9-
class InternalAnnotationsTest extends \PHPStan\Testing\TestCase
9+
class InternalAnnotationsTest extends \PHPStan\Testing\PHPStanTestCase
1010
{
1111

1212
public function dataInternalAnnotations(): array

tests/PHPStan/Reflection/Annotations/ThrowsAnnotationsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PHPStan\Broker\Broker;
88
use PHPStan\Type\VerbosityLevel;
99

10-
class ThrowsAnnotationsTest extends \PHPStan\Testing\TestCase
10+
class ThrowsAnnotationsTest extends \PHPStan\Testing\PHPStanTestCase
1111
{
1212

1313
public function dataThrowsAnnotations(): array

tests/PHPStan/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocatorTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PHPStan\BetterReflection\Reflector\ClassReflector;
77
use PHPStan\BetterReflection\Reflector\ConstantReflector;
88
use PHPStan\BetterReflection\Reflector\FunctionReflector;
9-
use PHPStan\Testing\TestCase;
9+
use PHPStan\Testing\PHPStanTestCase;
1010
use TestSingleFileSourceLocator\AFoo;
1111
use TestSingleFileSourceLocator\InCondition;
1212

@@ -15,7 +15,7 @@ function testFunctionForLocator(): void // phpcs:disable
1515

1616
}
1717

18-
class AutoloadSourceLocatorTest extends TestCase
18+
class AutoloadSourceLocatorTest extends PHPStanTestCase
1919
{
2020

2121
public function testAutoloadEverythingInFile(): void

tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedDirectorySourceLocatorTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
use PHPStan\BetterReflection\Reflector\ClassReflector;
66
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
77
use PHPStan\BetterReflection\Reflector\FunctionReflector;
8-
use PHPStan\Testing\TestCase;
8+
use PHPStan\Testing\PHPStanTestCase;
99
use TestDirectorySourceLocator\AFoo;
1010

11-
class OptimizedDirectorySourceLocatorTest extends TestCase
11+
class OptimizedDirectorySourceLocatorTest extends PHPStanTestCase
1212
{
1313

1414
public function dataClass(): array

tests/PHPStan/Reflection/BetterReflection/SourceLocator/OptimizedSingleFileSourceLocatorTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
use PHPStan\BetterReflection\Reflector\ConstantReflector;
77
use PHPStan\BetterReflection\Reflector\Exception\IdentifierNotFound;
88
use PHPStan\BetterReflection\Reflector\FunctionReflector;
9-
use PHPStan\Testing\TestCase;
9+
use PHPStan\Testing\PHPStanTestCase;
1010
use TestSingleFileSourceLocator\AFoo;
1111

12-
class OptimizedSingleFileSourceLocatorTest extends TestCase
12+
class OptimizedSingleFileSourceLocatorTest extends PHPStanTestCase
1313
{
1414

1515
public function dataClass(): array

tests/PHPStan/Reflection/ClassReflectionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use PHPStan\Type\FileTypeMapper;
1414
use WrongClassConstantFile\SecuredRouter;
1515

16-
class ClassReflectionTest extends \PHPStan\Testing\TestCase
16+
class ClassReflectionTest extends \PHPStan\Testing\PHPStanTestCase
1717
{
1818

1919
public function dataHasTraitUse(): array

tests/PHPStan/Reflection/GenericParametersAcceptorResolverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use PHPStan\Type\UnionType;
1919
use PHPStan\Type\VerbosityLevel;
2020

21-
class GenericParametersAcceptorResolverTest extends \PHPStan\Testing\TestCase
21+
class GenericParametersAcceptorResolverTest extends \PHPStan\Testing\PHPStanTestCase
2222
{
2323

2424
/**

tests/PHPStan/Reflection/MixedTypeTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
use NativeMixedType\Foo;
66
use PhpParser\Node\Name;
7-
use PHPStan\Testing\TestCase;
7+
use PHPStan\Testing\PHPStanTestCase;
88
use PHPStan\Type\MixedType;
99

10-
class MixedTypeTest extends TestCase
10+
class MixedTypeTest extends PHPStanTestCase
1111
{
1212

1313
public function testMixedType(): void

tests/PHPStan/Reflection/ParametersAcceptorSelectorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use PHPStan\Type\UnionType;
2323
use PHPStan\Type\VerbosityLevel;
2424

25-
class ParametersAcceptorSelectorTest extends \PHPStan\Testing\TestCase
25+
class ParametersAcceptorSelectorTest extends \PHPStan\Testing\PHPStanTestCase
2626
{
2727

2828
public function dataSelectFromTypes(): \Generator

0 commit comments

Comments
 (0)