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-only] [5.1] skip testParseMimeTypeOnInvalidMimeType #223

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

phil-davis
Copy link
Contributor

I added markTestSkipped for testParseMimeTypeOnInvalidMimeType
I left the test there for completeness. And it can be run locally if someone wants to see what happens:

$ export EXECUTE_INVALID_MIME_TYPE_TEST=true
$ composer phpunit
> phpunit --configuration tests/phpunit.xml
PHPUnit 9.6.10 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

...............................................................  63 / 167 ( 37%)
.../home/phil/git/sabre-io/http/lib/functions.php:333:
array(1) {
  [0] =>
  string(17) "invalid_mime_type"
}

Fixes #222

This is the workaround that I can think of - it at least makes it so that the rest of the unit tests actually run.

@phil-davis phil-davis requested a review from staabm August 17, 2023 15:17
@phil-davis phil-davis self-assigned this Aug 17, 2023
@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

❗ No coverage uploaded for pull request base (5.1@f67757f). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             5.1     #223   +/-   ##
======================================
  Coverage       ?   94.48%           
  Complexity     ?      263           
======================================
  Files          ?       15           
  Lines          ?      924           
  Branches       ?        0           
======================================
  Hits           ?      873           
  Misses         ?       51           
  Partials       ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@phil-davis
Copy link
Contributor Author

https://github.com/sabre-io/http/actions/runs/5892772777/job/15982808250?pr=223

PHPUnit 9.6.10 by Sebastian Bergmann and contributors.

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

...............................................................  63 / 167 ( 37%)
...S........................................................... 126 / 167 ( 75%)
.........................................                       167 / 167 (100%)

Time: 00:18.539, Memory: 79.99 MB

OK, but incomplete, skipped, or risky tests!
Tests: 167, Assertions: 304, Skipped: 1.

There is one S in the test output, indicating a skipped test.
The other tests all run and pass - good.

Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
@phil-davis phil-davis requested a review from staabm August 17, 2023 15:24
@phil-davis
Copy link
Contributor Author

Note: phpunit also emits:

Suggestion:    Migrate your XML configuration using "--migrate-configuration"

We need to allow unit tests to run in CI on older PHP versions for 5.x, so we can't do that migrate-configuration here in the 5.1 branch. We just ignore that - it is sorted out in the later major releases 6 and 7.

@phil-davis phil-davis merged commit 3c5e4ac into sabre-io:5.1 Aug 17, 2023
@phil-davis phil-davis deleted the fix-222 branch August 17, 2023 15:43
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