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

Routes shell test updates #11105

Merged
merged 4 commits into from Aug 26, 2017

Conversation

Projects
None yet
3 participants
@markstory
Member

markstory commented Aug 25, 2017

This new test case class lets us use less code to test shell commands. I've added a new assertion as it made updating the existing tests easier.

cc @jeremyharris

markstory added some commits Aug 25, 2017

Add assertErrorEmpty()
This is handy for making sure a shell doesn't output any error messages.
Move RoutesShell test to use the integration test case.
This new test case class lets us use less code to test shell commands.

@markstory markstory added the testing label Aug 25, 2017

@markstory markstory added this to the 3.5.1 milestone Aug 25, 2017

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Aug 25, 2017

Codecov Report

Merging #11105 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #11105      +/-   ##
============================================
- Coverage     94.89%   94.89%   -0.01%     
- Complexity    12841    12868      +27     
============================================
  Files           437      437              
  Lines         32742    32806      +64     
============================================
+ Hits          31070    31130      +60     
- Misses         1672     1676       +4
Impacted Files Coverage Δ Complexity Δ
src/TestSuite/ConsoleIntegrationTestCase.php 100% <100%> (ø) 28 <3> (+3) ⬆️
src/Cache/CacheEngine.php 89.36% <0%> (-4.26%) 19% <0%> (ø)
src/Cache/CacheRegistry.php 96% <0%> (-4%) 11% <0%> (ø)
src/View/Helper/TextHelper.php 98.49% <0%> (-0.32%) 48% <0%> (+24%)

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 e5808ba...7c76081. Read the comment docs.

codecov-io commented Aug 25, 2017

Codecov Report

Merging #11105 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #11105      +/-   ##
============================================
- Coverage     94.89%   94.89%   -0.01%     
- Complexity    12841    12868      +27     
============================================
  Files           437      437              
  Lines         32742    32806      +64     
============================================
+ Hits          31070    31130      +60     
- Misses         1672     1676       +4
Impacted Files Coverage Δ Complexity Δ
src/TestSuite/ConsoleIntegrationTestCase.php 100% <100%> (ø) 28 <3> (+3) ⬆️
src/Cache/CacheEngine.php 89.36% <0%> (-4.26%) 19% <0%> (ø)
src/Cache/CacheRegistry.php 96% <0%> (-4%) 11% <0%> (ø)
src/View/Helper/TextHelper.php 98.49% <0%> (-0.32%) 48% <0%> (+24%)

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 e5808ba...7c76081. Read the comment docs.

@jeremyharris

Sweet! Looks good.

Do you think it'd be useful to add $this->assertExitCode(Shell::CODE_SUCCESS); to each of them as you expect they're successful? Except the ones that fail, of course.

Show outdated Hide outdated tests/TestCase/Shell/RoutesShellTest.php
{
$output = implode(PHP_EOL, $this->_err->messages());
$this->assertSame('', $output, $message);
}

This comment has been minimized.

@jeremyharris

jeremyharris Aug 25, 2017

Member

I imagine people might expect assertOutputEmpty too :)

@jeremyharris

jeremyharris Aug 25, 2017

Member

I imagine people might expect assertOutputEmpty too :)

This comment has been minimized.

@markstory

markstory Aug 26, 2017

Member

Ok I can add that too.

@markstory

markstory Aug 26, 2017

Member

Ok I can add that too.

@markstory markstory self-assigned this Aug 26, 2017

@markstory markstory added the console label Aug 26, 2017

markstory added some commits Aug 26, 2017

Add more assertion methods to ConsoleIntegrationTestCase.
Add assertions for checking table rows, and empty output.

@markstory markstory merged commit 31c1c85 into master Aug 26, 2017

6 checks passed

codecov/patch 100% of diff hit (target 94.89%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +5.1% compared to e5808ba
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
stickler-ci No lint errors found.

@markstory markstory deleted the routes-shell-test-updates branch Aug 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment