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

Test enhancement #176

Merged

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Nov 2, 2021

This is a rebase of #98

I rebased again today 2022-08-26, removed the small "real" code change that was in lib/functions.php and squashed. Now this just has extra test cases, which looks fine. I will merge.

@codecov
Copy link

codecov bot commented Nov 2, 2021

Codecov Report

Merging #176 (3501890) into master (3000a8a) will increase coverage by 0.78%.
The diff coverage is 100.00%.

❗ Current head 3501890 differs from pull request most recent head 78b519c. Consider uploading reports for the commit 78b519c to get more accurate results

@@             Coverage Diff              @@
##             master     #176      +/-   ##
============================================
+ Coverage     94.11%   94.90%   +0.78%     
  Complexity      260      260              
============================================
  Files            15       15              
  Lines           884      883       -1     
============================================
+ Hits            832      838       +6     
+ Misses           52       45       -7     
Impacted Files Coverage Δ
lib/functions.php 97.81% <100.00%> (+2.15%) ⬆️
lib/Sapi.php 99.06% <0.00%> (+1.86%) ⬆️
lib/Auth/AWS.php 89.33% <0.00%> (+2.66%) ⬆️

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

@phil-davis phil-davis marked this pull request as ready for review November 2, 2021 15:51
var_dump($mimeType);
exit();
// throw new InvalidArgumentException('Not a valid mime-type: '.$str);
throw new InvalidArgumentException('Not a valid mime-type: '.$str);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@staabm @DeepDiver1975 this changes this function so that it can throw an exception. This is the only exception thrown in the whole of functions.php Other functons in this code return false if something goes wrong.

The existing code just exits!

Are callers going to be OK with this function now throwing an exception? Or?

@phil-davis phil-davis mentioned this pull request Nov 2, 2021
@phil-davis phil-davis force-pushed the test_enhancement-rebased-20211102 branch from 9d7f508 to 3501890 Compare August 26, 2022 05:29
@phil-davis phil-davis force-pushed the test_enhancement-rebased-20211102 branch from d45baf3 to 78b519c Compare August 26, 2022 05:35
@phil-davis phil-davis merged commit 6ace53a into sabre-io:master Aug 26, 2022
@phil-davis phil-davis deleted the test_enhancement-rebased-20211102 branch August 26, 2022 05:36
@phil-davis phil-davis mentioned this pull request Aug 26, 2022
4 tasks
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