Skip to content

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

Merged
adamnfish-gu merged 1 commit into
mainfrom
fix/php
Oct 19, 2026
Merged

adamnfish-gu merged 1 commit into
mainfrom
fix/php

Conversation

@adamnfish-gu

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

Copy link
Copy Markdown
Contributor

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>

@emdash-ie emdash-ie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don’t know PHP, but this looks fine! I also installed PHP from my package manager and was able to run the code and tests on #171, so I’m confident this is fine

Base automatically changed from platform/tool-versions-ci to main October 19, 2026 14:12
@adamnfish-gu
adamnfish-gu merged commit c441e7a into main Oct 19, 2026
6 checks passed
@adamnfish-gu
adamnfish-gu deleted the fix/php branch October 19, 2026 14:20
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