8000 [PhpUnitBridge] Assert missing deprecations by ro0NL · Pull Request #21296 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PhpUnitBridge] Assert missing deprecations #21296

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Next Next commit
[PhpUnitBridge] Assert missing deprecations
  • Loading branch information
ro0NL committed Jan 15, 2017
commit 4fb945b85f74eb1a415ae6661b5bcfccd1f1c34d
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
try {
$prefix = "@expectedDeprecation:\n";
$test->assertStringMatchesFormat($prefix.'%A '.implode("\n%A ", $this->expectedDeprecations)."\n%A", $prefix.' '.implode("\n ", $this->gatheredDeprecations)."\n");

if ($missing = array_diff($this->gatheredDeprecations, $this->expectedDeprecations)) {
$test->assertStringMatchesFormat($prefix.'%A '.implode("\n%A ", $missing)."\n%A", $prefix.' '.implode("\n ", array())."\n");
}
} catch (\PHPUnit_Framework_AssertionFailedError $e) {
$test->getTestResultObject()->addFailure($test, $e, $time);
}
Expand Down
0