Skip to content

Add test suite, testing macros, and testing docs - #3

Merged
shanerbaner82 merged 3 commits into
mainfrom
add-testing-suite
Jul 19, 2026
Merged

Add test suite, testing macros, and testing docs#3
shanerbaner82 merged 3 commits into
mainfrom
add-testing-suite

Conversation

@shanerbaner82

Copy link
Copy Markdown
Contributor

What

Adds an automated test suite, plugin-specific FakeBridge testing macros, and README testing docs.

  • Pest suite — Testbench TestCase (boots the NativePHP core provider + this plugin), a PluginTest validating the manifest / native-code classes / composer config, and a facade↔bridge contract test driven through the core FakeBridge.
  • src/Testing/*Macros.php — plugin-specific with* / assert* vocabulary on the FakeBridge, auto-registered under test runs on a macroable core (guarded so older cores stay fatal-free).
  • *MacrosTest — covers each macro (pass + failure cases).
  • README ## Testing — shows how app developers fake/assert this plugin in their own tests.

Verified green against nativephp/mobile dev-main.

🤖 Generated with Claude Code

shanerbaner82 and others added 3 commits July 18, 2026 19:13
- Pest suite: Testbench TestCase + core provider, PluginTest (manifest/
  native-code/composer validation), and a facade↔bridge contract test
  driven through the FakeBridge.
- src/Testing/*Macros.php: plugin-specific FakeBridge with*/assert*
  vocabulary, auto-registered under test runs on a macroable core.
- *MacrosTest covering the macros (pass + failure cases).
- README "## Testing" section showing app-test usage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves nativephp/mobile from the public mobile-air repo as dev-main
(the v4 core with the FakeBridge testing classes) — until 4.0 is a
stable Packagist release, a plain composer install would pull v3 and
fail. PHP 8.4 to match the v4 core.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- phpunit.xml: fixes CI where Pest/PHPUnit needs an explicit config +
  cacheDirectory (the "Could not read XML from --cache-directory" error).
- CI: add a standalone `pint --test` job (no vendor needed) alongside Pest.
- Apply pint fixes to the generated test files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shanerbaner82
shanerbaner82 merged commit 8b3abe6 into main Jul 19, 2026
2 checks passed
@shanerbaner82
shanerbaner82 deleted the add-testing-suite branch July 19, 2026 01:47
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