Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
<file>app/Providers/AppServiceProvider.php</file>
</exclude>
</source>
<coverage>
<report>
<html outputDirectory="coverage-html" lowUpperBound="50" highLowerBound="80"/>
<clover outputFile="coverage.xml"/>
</report>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
Expand Down
9 changes: 9 additions & 0 deletions tests/Unit/Services/GitHubServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,12 @@
// Should be abbreviated
expect($result)->toBe('12.5K');
});

it('returns int even when cache contains string value', function () {
// Simulate cache containing a string (as might happen from serialization)
Cache::put('github_stars_Relaticle_relaticle', '125', now()->addMinutes(15));

$result = $this->service->getStarsCount('Relaticle', 'relaticle');

expect($result)->toBe(125)->toBeInt();
});