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

[Feature] Add env_is_... helper functions #31

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Conversation

titouanmathis
Copy link
Contributor

Add the following helper functions and methods for easier environment testing:

use Studiometa\WPToolkit\Helpers\Env;
use function \Studiometa\WPToolkit\env_is_prod;
use function \Studiometa\WPToolkit\env_is_preprod;
use function \Studiometa\WPToolkit\env_is_local;
use function \Studiometa\WPToolkit\env_is_staging;
use function \Studiometa\WPToolkit\env_is_development;

env_is_prod(); // bool
env_is_preprod(); // bool
env_is_local(); // bool
env_is_staging(); // bool
env_is_development(); // bool

Env::is_prod(); // bool
Env::is_preprod(); // bool
Env::is_local(); // bool
Env::is_staging(); // bool
Env::is_development(); // bool

@titouanmathis titouanmathis changed the base branch from master to develop March 20, 2024 15:40
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.98%. Comparing base (5bdc7e3) to head (46d8348).

Additional details and impacted files
@@              Coverage Diff              @@
##             develop      #31      +/-   ##
=============================================
+ Coverage      62.81%   63.98%   +1.17%     
- Complexity       194      201       +7     
=============================================
  Files             14       14              
  Lines            554      572      +18     
=============================================
+ Hits             348      366      +18     
  Misses           206      206              
Flag Coverage Δ
unittests 63.98% <100.00%> (+1.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@titouanmathis titouanmathis merged commit a3418ac into develop Mar 20, 2024
11 checks passed
@titouanmathis titouanmathis deleted the feature/is-env branch March 25, 2024 09:09
@titouanmathis titouanmathis mentioned this pull request Mar 28, 2024
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.

1 participant