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

tests: fix a test after a bug was resolved in doctrine migrations #791

Merged
merged 1 commit into from
Jan 18, 2025
Merged
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
13 changes: 3 additions & 10 deletions tests/Integration/Migration/ResetDatabaseWithMigrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,9 @@ public function it_generates_valid_schema(): void
$application = new Application(self::bootKernel());
$application->setAutoExit(false);

$exit = $application->run(
new ArrayInput(['command' => 'doctrine:schema:validate', '-v' => true]),
$output = new BufferedOutput()
);

// The command actually fails, because of a bug in doctrine ORM 3!
// https://github.com/doctrine/migrations/issues/1406
Comment on lines -53 to -54
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the bug is fixed 🎉
doctrine/migrations#1406 (comment)

self::assertSame(2, $exit, \sprintf('Schema is not valid: %s', $commandOutput = $output->fetch()));
self::assertStringContainsString('1 schema diff(s) detected', $commandOutput);
self::assertStringContainsString('DROP TABLE doctrine_migration_versions', $commandOutput);
$exit = $application->run(new ArrayInput(['command' => 'doctrine:schema:validate', '-v' => true]), new BufferedOutput());

self::assertSame(0, $exit);
}

/**
Expand Down
Loading