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

fix: move mocks to src directory #21

Merged
merged 2 commits into from
May 13, 2024
Merged

fix: move mocks to src directory #21

merged 2 commits into from
May 13, 2024

Conversation

rdesorme
Copy link
Contributor

Hi !

When I install this project with composer, I have this error:

   Error 

  Class "Oneduo\RecaptchaEnterprise\Tests\Mocks\FakeRecaptchaEnterprise" not found

  at vendor/oneduo/laravel-recaptcha-enterprise/src/Facades/RecaptchaEnterprise.php:41
     37▕ 
     38▕     public static function fake(bool $alwaysValid = null, ?Closure $callback = null): RecaptchaContract
     39▕     {
     40▕         return tap(static::getFacadeRoot(), function (RecaptchaService $fake) use ($alwaysValid, $callback) {
  ➜  41▕             static::swap(is_callable($callback) ? $callback($fake) : new FakeRecaptchaEnterprise($alwaysValid));
     42▕         });
     43▕     }
     44▕ }
     45▕ 

      +21 vendor frames 
  22  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan ide-helper:generate handling the post-update-cmd event returned with error code 1

When I check in vendor files, vendor/oneduo/laravel-recaptcha-enterprise/tests is missing. So I move Mocks directory to src

Copy link

codecov bot commented May 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.92%. Comparing base (7f9780f) to head (7ef7648).
Report is 15 commits behind head on main.

❗ Current head 7ef7648 differs from pull request most recent head b1cad15. Consider uploading reports for the commit b1cad15 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##                main      #21      +/-   ##
=============================================
- Coverage     100.00%   92.92%   -7.08%     
- Complexity        22       43      +21     
=============================================
  Files              5        6       +1     
  Lines             54       99      +45     
=============================================
+ Hits              54       92      +38     
- Misses             0        7       +7     

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

@Rezrazi
Copy link
Contributor

Rezrazi commented May 11, 2024

Thank you @rdesorme

Can you please mark the Mock class as codeCoverageIgnore? Will merge right after

@Rezrazi Rezrazi merged commit 89812a0 into oneduo:main May 13, 2024
1 of 9 checks passed
@Rezrazi
Copy link
Contributor

Rezrazi commented May 13, 2024

Thank you !

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