FOUR-20912: Enhance Test Coverage for Screens Functionality Before Adding Cache#7764
Merged
caleeli merged 2 commits intoepic/FOUR-20326from Nov 26, 2024
Merged
FOUR-20912: Enhance Test Coverage for Screens Functionality Before Adding Cache#7764caleeli merged 2 commits intoepic/FOUR-20326from
caleeli merged 2 commits intoepic/FOUR-20326from
Conversation
caleeli
requested changes
Nov 26, 2024
Contributor
caleeli
left a comment
There was a problem hiding this comment.
Add a negative test, when the storage fails. Something like:
/** @test */
public function it_handles_storage_limit_scenarios()
{
// Mock storage reaching its limit
Storage::shouldReceive('disk->put')
->andThrow(new \Illuminate\Contracts\Filesystem\FileNotFoundException());
$key = $this->manager->createKey('1', '1', 'en', '1', '1');
$this->expectException(\Exception::class);
$this->manager->storeCompiledContent($key, ['test' => 'content']);
}
caleeli
approved these changes
Nov 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…dding Cache
Issue & Reproduction Steps
As a developer I want to improve test coverage for tests/Feature/Screens/ScreenCompiledManagerTest.php test
Solution
How to Test
run the next command s
// run the test php artisan test --filter=ScreenCompiledManagerTest // check coverage vendor/bin/phpunit --coverage-html coverage-report tests/Feature/Screens/ScreenCompiledManagerTest.phpRelated Tickets & Packages
Code Review Checklist