We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure if this is a PEST or Laravel Zero issue, or just me...prob the latter.
But I am trying to test a class that has another class as a dependency, and this dependency uses the Cache Facade.
In regular Laravel/PHPUnit, I am able to use the Cache::shouldReceive() and other helper methods to mock facades.
Cache::shouldReceive()
When trying this in my current Laravel Zero/Pest project, I am getting:
Illuminate\Contracts\Container\BindingResolutionException Target class [cache] does not exist.
My test
test('Vault Retriever ', function (string $annotationData, bool $expectedResult) { Cache::shouldReceive('get')->once(); $vaultRetriever= app()->make(VaultRetriever::class); $result = $vaultRetriever->filter($annotationData); expect($result)->toBe($expectedResult); })->with([ ['vault:secret/data/test/some/stupid#path', true], ['vault:missing/stuff', false], ]);
Any idea what the issue is here? Or what I can do to correct?
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Not sure if this is a PEST or Laravel Zero issue, or just me...prob the latter.
But I am trying to test a class that has another class as a dependency, and this dependency uses the Cache Facade.
In regular Laravel/PHPUnit, I am able to use the
Cache::shouldReceive()
and other helper methods to mock facades.When trying this in my current Laravel Zero/Pest project, I am getting:
My test
Any idea what the issue is here? Or what I can do to correct?
Thanks
The text was updated successfully, but these errors were encountered: