-
Notifications
You must be signed in to change notification settings - Fork 14
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
Test the stats:fetch
command, and report if Packagist download count fails
#251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just a few notes.
} | ||
|
||
/** @test */ | ||
public function fetch_stats_does_not_overwrite_packagist_stats(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding this test correctly, it means a failed request doesn't overwrite our local stats, right? If so, I'd change the method name to indicate this:
public function fetch_stats_does_not_overwrite_packagist_stats(): void | |
public function failed_stats_fetch_does_not_overwrite_packagist_stats(): void |
'name' => 'existing_package', | ||
'packagist_name' => null, | ||
]); | ||
$maintainer = Maintainer::factory()->create([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in another PR, but this feels silly to have to create the maintainer in this test when it isn't relevant to this test. Could we add a factory state (I think that's what they're called these days) for the project factory so we could just chain withMaintainer()
when creating the project?
stats:fetch
commandstats:fetch
command, and report if Packagist download count fails
Great work @gcavanunez! |
Highlights
stats:fetch
commandNotes
reference