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

Enhancement: Add test for execution with --version option #3895

Merged
merged 1 commit into from
Oct 28, 2019

Conversation

localheinz
Copy link
Collaborator

This PR

  • adds a test for execution with the --version option

PHPUnit\TextUI\Command::main();
?>
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm unaware of it, is there a possibility to denote the end of the expected output?

Currently, another empty line is rendered after the version information, and the test also passes with the following diff applied

diff --git a/tests/end-to-end/version.phpt b/tests/end-to-end/version.phpt
index bdd38596c..af9ee63cc 100644
--- a/tests/end-to-end/version.phpt
+++ b/tests/end-to-end/version.phpt
@@ -11,3 +11,7 @@ PHPUnit\TextUI\Command::main();
 ?>
 --EXPECTF--
 PHPUnit %s by Sebastian Bergmann and contributors.
+
+
+
+

Copy link
Collaborator Author

@localheinz localheinz Oct 13, 2019

Choose a reason for hiding this comment

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

Ha, both actual and expected output are trimmed, see

@codecov
Copy link

codecov bot commented Oct 13, 2019

Codecov Report

Merging #3895 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3895      +/-   ##
============================================
+ Coverage     83.67%   83.69%   +0.01%     
  Complexity     3855     3855              
============================================
  Files           151      151              
  Lines         10199    10199              
============================================
+ Hits           8534     8536       +2     
+ Misses         1665     1663       -2
Impacted Files Coverage Δ Complexity Δ
src/TextUI/Command.php 75.41% <0%> (+0.33%) 213% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86c32b9...60a9495. Read the comment docs.

@localheinz localheinz changed the base branch from master to 7.5 October 13, 2019 20:56
@sebastianbergmann sebastianbergmann merged commit 2d33f54 into sebastianbergmann:7.5 Oct 28, 2019
@localheinz localheinz deleted the feature/version branch October 28, 2019 07:57
@localheinz
Copy link
Collaborator Author

Thank you, @sebastianbergmann!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants