Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit 10.4.0 #6123

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"phpstan/phpstan": "1.10.35",
"phpstan/phpstan-phpunit": "1.3.14",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "10.2.2",
"phpunit/phpunit": "10.4.0",
"psalm/plugin-phpunit": "0.18.4",
"slevomat/coding-standard": "8.13.1",
"squizlabs/php_codesniffer": "3.7.2",
Expand Down
4 changes: 2 additions & 2 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
</ConflictingReferenceConstraint>
<DeprecatedMethod>
<errorLevel type="suppress">
<!-- TODO for PHPUnit 10 -->
<referencedMethod name="PHPUnit\Framework\MockObject\Builder\InvocationMocker::withConsecutive"/>
<!-- TODO for PHPUnit 11 -->
<referencedMethod name="PHPUnit\Framework\TestCase::iniSet"/>
</errorLevel>
</DeprecatedMethod>
<DocblockTypeContradiction>
Expand Down
4 changes: 2 additions & 2 deletions tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public function testRollBackStartsTransactionInNoAutoCommitMode(): void

public function testSwitchingAutoCommitModeCommitsAllCurrentTransactions(): void
{
$platform = $this->createStub(AbstractPlatform::class);
$platform = self::createStub(AbstractPlatform::class);
$platform
->method('supportsSavepoints')
->willReturn(true);
Expand Down Expand Up @@ -610,7 +610,7 @@ public function testConnectionParamsArePassedToTheQueryCacheProfileInExecuteCach

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

Expand Down
10 changes: 10 additions & 0 deletions tests/Functional/Schema/SchemaManagerFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ protected function tearDown(): void
$this->connection->executeStatement('DROP SCHEMA testschema');
} catch (Exception) {
}

try {
$this->connection->executeStatement('DROP VIEW test_view');
} catch (Exception) {
}

try {
$this->connection->executeStatement('DROP VIEW doctrine_test_view');
} catch (Exception) {
}
}

public function testCreateSequence(): void
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/Schema/SqliteSchemaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function createListTableColumns(): Table

public function testListForeignKeysFromExistingDatabase(): void
{
$this->connection->executeStatement('DROP TABLE IF EXISTS user');
$this->connection->executeStatement(<<<'EOS'
CREATE TABLE user (
id INTEGER PRIMARY KEY AUTOINCREMENT,
Expand Down
4 changes: 2 additions & 2 deletions tests/Platforms/AbstractMySQLPlatformTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ protected function createComparator(): Comparator
{
return new MySQL\Comparator(
$this->platform,
$this->createStub(CharsetMetadataProvider::class),
$this->createStub(CollationMetadataProvider::class),
self::createStub(CharsetMetadataProvider::class),
self::createStub(CollationMetadataProvider::class),
new DefaultTableOptions('utf8mb4', 'utf8mb4_general_ci'),
);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Platforms/MySQL/ComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ protected function setUp(): void
{
$this->comparator = new Comparator(
new MySQLPlatform(),
$this->createStub(CharsetMetadataProvider::class),
$this->createStub(CollationMetadataProvider::class),
self::createStub(CharsetMetadataProvider::class),
self::createStub(CollationMetadataProvider::class),
new DefaultTableOptions('utf8mb4', 'utf8mb4_general_ci'),
);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Schema/Platforms/MySQLSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ private function createComparator(): Comparator
{
return new MySQL\Comparator(
new MySQLPlatform(),
$this->createStub(CharsetMetadataProvider::class),
$this->createStub(CollationMetadataProvider::class),
self::createStub(CharsetMetadataProvider::class),
self::createStub(CollationMetadataProvider::class),
new DefaultTableOptions('utf8mb4', 'utf8mb4_general_ci'),
);
}
Expand Down