Skip to content

Port framework-driver test suite from upstream - #4

Merged
Sandersm90 merged 3 commits into
masterfrom
test/port-driver-suite
Oct 1, 2026
Merged

Sandersm90 merged 3 commits into
masterfrom
test/port-driver-suite

Conversation

@Sandersm90

Copy link
Copy Markdown

Stacked on #3.

The fork had zero driver tests. Adopts upstream laravel/valet's suite (platform-agnostic, same Valet\Drivers namespace).

  • Add tests/Drivers/ (BaseDriverTestCase + 23 driver tests) and tests/Drivers/projects + tests/files fixtures. Base case namespaced Valet\Tests\Drivers, extends PHPUnit TestCase directly (no container boot), setUp() instead of the Yoast polyfill's set_up(), projects provider via plain scandir().
  • Add NetteValetDriver (upstream drop-in) so the driver set matches upstream.
  • Two ContaoValetDriverTest methods are skipped: the fork still ships the legacy Contao 3/4 driver while the upstream fixture is modern Contao. Re-enable after modernizing the driver.
  • Refresh phpstan-baseline.neon to absorb the new test files' level-9 errors (burn-down backlog); analysis stays green.

Result: 305 tests, 2 skipped, php-cs-fixer clean, phpstan green.

- Add phpstan/phpstan-mockery so Mockery-based test doubles are understood.
- Generate phpstan-baseline.neon capturing the 593 pre-existing level-9 errors
  so the analysis exits clean and flags only new regressions; the baseline is
  the burn-down backlog.
- Add composer scripts (test, stan, cs, cs:fix); stan bakes in --memory-limit=1G
  to avoid the default 128M OOM.
The fork had zero driver tests. Adopt upstream's suite (platform-agnostic,
same Valet\Drivers namespace):

- Add tests/Drivers/ (BaseDriverTestCase + 23 driver tests) and the
  tests/Drivers/projects + tests/files fixtures. Base case namespaced
  Valet\Tests\Drivers, extends PHPUnit TestCase directly (no container boot),
  setUp() instead of the Yoast polyfill's set_up(), projects provider via
  plain scandir().
- Add NetteValetDriver (upstream drop-in) so the driver set matches upstream;
  auto-discovered by the specific-driver path scan.
- Two ContaoValetDriverTest methods are marked skipped: the fork still ships
  the legacy Contao 3/4 driver while the upstream fixture is modern Contao;
  re-enable after modernizing the driver (.review U6).
- Refresh phpstan-baseline.neon to absorb the new test files' level-9 errors
  (burn-down backlog); analysis stays green.

Full suite: 305 tests, 2 skipped. php-cs-fixer clean.
The repo's .gitignore excludes bin/ and vendor/, which also matched three
driver-suite fixtures, so they were never committed:
- tests/Drivers/projects/cake/bin/cake
- tests/Drivers/projects/magento2/bin/magento
- tests/Drivers/projects/contao/vendor/contao/.gitkeep

Force-add them so CakeValetDriverTest / Magento2ValetDriverTest (and the
Contao test once modernized) see their fixtures on a fresh checkout. Caught
by CI (passed locally only because the Docker mount included ignored files).
@Sandersm90
Sandersm90 changed the base branch from chore/phpstan-usable-signal to master October 1, 2026 12:54
@Sandersm90
Sandersm90 merged commit 15239f1 into master Oct 1, 2026
5 checks passed
@Sandersm90
Sandersm90 deleted the test/port-driver-suite branch October 1, 2026 12:56
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