Skip to content

Commit c16223f

Browse files
committed
Rename base test case from TestCase to BaseTestCase to prevent import conflicts with PHPUnit's TestCase.
1 parent 0b92888 commit c16223f

File tree

76 files changed

+95
-95
lines changed

Some content is hidden

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

76 files changed

+95
-95
lines changed

compiler/build/scoper.inc.php

Lines changed: 2 additions & 2 deletions
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/BaseTestCase.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/BaseTestCase.php',
164164
], true)) {
165165
return $content;
166166
}

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

Lines changed: 1 addition & 1 deletion
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 BaseTestCase extends \PHPUnit\Framework\TestCase
8080
{
8181

8282
/** @var bool */

src/Testing/ErrorFormatterTestCase.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
1515
{
1616

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

src/Testing/RuleTestCase.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
3232
{
3333

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

src/Testing/TypeInferenceTestCase.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
3232
{
3333

3434
/**

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
1717
{
1818

1919
public function testUndefinedVariableFromAssignErrorHasLine(): void

tests/PHPStan/Analyser/AnalyserTest.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
2727
{
2828

2929
public function testReturnErrorIfIgnoredMessagesDoesNotOccur(): void

tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
88
{
99

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

tests/PHPStan/Analyser/ErrorTest.php

Lines changed: 1 addition & 1 deletion
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\BaseTestCase
66
{
77

88
public function testError(): void

tests/PHPStan/Analyser/ScopeTest.php

Lines changed: 2 additions & 2 deletions
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\BaseTestCase;
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 BaseTestCase
1818
{
1919

2020
public function dataGeneralize(): array

0 commit comments

Comments
 (0)