Skip to content

php: Fix skeleton test to pass and expose testable code - #170

Open
adamnfish-gu wants to merge 1 commit into
platform/tool-versions-cifrom
fix/php
Open

php: Fix skeleton test to pass and expose testable code#170
adamnfish-gu wants to merge 1 commit into
platform/tool-versions-cifrom
fix/php

Conversation

@adamnfish-gu

@adamnfish-gu adamnfish-gu commented Aug 7, 2026

Copy link
Copy Markdown

Tests.php asserted assertSame(true, false), which always fails.

code.php echoed output and returned nothing, so there was nothing to assert on. It now exposes a greeting() function and guards the direct invocation so the file can be required without side effects. The test asserts on the return value.


Base platform/tool-versions-ci (#144), so the diff shows only this branch's changes. Merge #144 first.

Part of #143.

Tests.php asserted assertSame(true, false), which always fails.

code.php echoed output and returned nothing, so there was nothing to assert
on. It now exposes a greeting() function and guards the direct invocation so
the file can be required without side effects. The test asserts on the return
value.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant