Skip to content

test(php): skip when composer is missing#7043

Merged
coryan merged 1 commit into
googleapis:mainfrom
coryan:test-php-skip-without-composer
Jul 25, 2026
Merged

test(php): skip when composer is missing#7043
coryan merged 1 commit into
googleapis:mainfrom
coryan:test-php-skip-without-composer

Conversation

@coryan

@coryan coryan commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

One of the tests failed if composer was not installed. Skip the test instead.

One of the tests failed if `composer` was not installed. Skip the test
instead.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a check to require the 'composer' command in the 'TestInstall_Error' test suite. The reviewer suggests avoiding skipping the entire suite when 'composer' is missing, as this unnecessarily reduces test coverage. Instead, they recommend mocking 'composer' and 'php' specifically for the test case that requires them, which would also make the new 'testhelper' import unnecessary.

Comment thread internal/librarian/php/install_test.go
Comment thread internal/librarian/php/install_test.go
@coryan
coryan marked this pull request as ready for review July 25, 2026 00:00
@coryan
coryan requested a review from a team as a code owner July 25, 2026 00:00
@coryan
coryan merged commit e34bcd1 into googleapis:main Jul 25, 2026
38 of 39 checks passed
@coryan
coryan deleted the test-php-skip-without-composer branch July 25, 2026 00:13
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.

2 participants