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

Moved unit tests for root album into separate class #1416

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

nagmat84
Copy link
Contributor

While working on #1414 I noticed that we do not have a test class which collects all API calls to the root album in the same way as we have for albums and photos. So far we only have had a method to call Albums::get as part of the (normal) albums test, but it also has been quite different in style from the typical methods we have. As I am going to need more API calls to the root album in #1414, I first want to remedy this situation.

@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #1416 (f6c37e5) into master (0c3619e) will decrease coverage by 0.81%.
The diff coverage is n/a.

@nagmat84 nagmat84 requested a review from a team July 24, 2022 11:49
): TestResponse {
$response = $this->testCase->postJson('/api/Albums::get');
$response->assertStatus($expectedStatusCode);
if ($assertSee) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing that phpstan is not parsing those files. 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I had the exact same though. I also inclined to write if ($asserSee !== null), but this is copy & paste from the other files and then I decided to keep it consistent. At some point in the future I would like to include the tests into PHPStan, but not now.

Copy link
Member

@ildyria ildyria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@nagmat84 nagmat84 merged commit 89fcba4 into master Jul 24, 2022
@nagmat84 nagmat84 deleted the unit_test_for_root_album branch July 24, 2022 14:35
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.

None yet

2 participants