Skip to content

Commit 3112306

Browse files
authored
PHPUnit 10.4.0 (#6123)
| Q | A |------------- | ----------- | Type | improvement | Fixed issues | N/A
1 parent 24af55b commit 3112306

File tree

8 files changed

+22
-11
lines changed

8 files changed

+22
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"phpstan/phpstan": "1.10.35",
4444
"phpstan/phpstan-phpunit": "1.3.14",
4545
"phpstan/phpstan-strict-rules": "^1.5",
46-
"phpunit/phpunit": "10.2.2",
46+
"phpunit/phpunit": "10.4.0",
4747
"psalm/plugin-phpunit": "0.18.4",
4848
"slevomat/coding-standard": "8.13.1",
4949
"squizlabs/php_codesniffer": "3.7.2",

psalm.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
</ConflictingReferenceConstraint>
4545
<DeprecatedMethod>
4646
<errorLevel type="suppress">
47-
<!-- TODO for PHPUnit 10 -->
48-
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::withConsecutive"/>
47+
<!-- TODO for PHPUnit 11 -->
48+
<referencedMethod name="PHPUnit\Framework\TestCase::iniSet"/>
4949
</errorLevel>
5050
</DeprecatedMethod>
5151
<DocblockTypeContradiction>

tests/ConnectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function testRollBackStartsTransactionInNoAutoCommitMode(): void
196196

197197
public function testSwitchingAutoCommitModeCommitsAllCurrentTransactions(): void
198198
{
199-
$platform = $this->createStub(AbstractPlatform::class);
199+
$platform = self::createStub(AbstractPlatform::class);
200200
$platform
201201
->method('supportsSavepoints')
202202
->willReturn(true);
@@ -610,7 +610,7 @@ public function testConnectionParamsArePassedToTheQueryCacheProfileInExecuteCach
610610

611611
public function testCustomSchemaManagerFactory(): void
612612
{
613-
$schemaManager = $this->createStub(AbstractSchemaManager::class);
613+
$schemaManager = self::createStub(AbstractSchemaManager::class);
614614
$factory = $this->createMock(SchemaManagerFactory::class);
615615
$factory->expects(self::once())->method('createSchemaManager')->willReturn($schemaManager);
616616

tests/Functional/Schema/SchemaManagerFunctionalTestCase.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,16 @@ protected function tearDown(): void
7777
$this->connection->executeStatement('DROP SCHEMA testschema');
7878
} catch (Exception) {
7979
}
80+
81+
try {
82+
$this->connection->executeStatement('DROP VIEW test_view');
83+
} catch (Exception) {
84+
}
85+
86+
try {
87+
$this->connection->executeStatement('DROP VIEW doctrine_test_view');
88+
} catch (Exception) {
89+
}
8090
}
8191

8292
public function testCreateSequence(): void

tests/Functional/Schema/SqliteSchemaManagerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function createListTableColumns(): Table
4242

4343
public function testListForeignKeysFromExistingDatabase(): void
4444
{
45+
$this->connection->executeStatement('DROP TABLE IF EXISTS user');
4546
$this->connection->executeStatement(<<<'EOS'
4647
CREATE TABLE user (
4748
id INTEGER PRIMARY KEY AUTOINCREMENT,

tests/Platforms/AbstractMySQLPlatformTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,8 @@ protected function createComparator(): Comparator
675675
{
676676
return new MySQL\Comparator(
677677
$this->platform,
678-
$this->createStub(CharsetMetadataProvider::class),
679-
$this->createStub(CollationMetadataProvider::class),
678+
self::createStub(CharsetMetadataProvider::class),
679+
self::createStub(CollationMetadataProvider::class),
680680
new DefaultTableOptions('utf8mb4', 'utf8mb4_general_ci'),
681681
);
682682
}

tests/Platforms/MySQL/ComparatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ protected function setUp(): void
1717
{
1818
$this->comparator = new Comparator(
1919
new MySQLPlatform(),
20-
$this->createStub(CharsetMetadataProvider::class),
21-
$this->createStub(CollationMetadataProvider::class),
20+
self::createStub(CharsetMetadataProvider::class),
21+
self::createStub(CollationMetadataProvider::class),
2222
new DefaultTableOptions('utf8mb4', 'utf8mb4_general_ci'),
2323
);
2424
}

tests/Schema/Platforms/MySQLSchemaTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ private function createComparator(): Comparator
6868
{
6969
return new MySQL\Comparator(
7070
new MySQLPlatform(),
71-
$this->createStub(CharsetMetadataProvider::class),
72-
$this->createStub(CollationMetadataProvider::class),
71+
self::createStub(CharsetMetadataProvider::class),
72+
self::createStub(CollationMetadataProvider::class),
7373
new DefaultTableOptions('utf8mb4', 'utf8mb4_general_ci'),
7474
);
7575
}

0 commit comments

Comments
 (0)