Skip to content

Migrate from nette/tester to PHPUnit - #37

Merged
janedbal merged 3 commits into
masterfrom
phpunit-migration
Aug 26, 2026
Merged

Migrate from nette/tester to PHPUnit#37
janedbal merged 3 commits into
masterfrom
phpunit-migration

Conversation

@janedbal

@janedbal janedbal commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace nette/tester with phpunit/phpunit ^13.3.
  • Convert tests/XmlLoaderTest.phpt to a standard PHPUnit test in tests/XmlLoaderTest.php.
  • Add phpunit.xml.dist with strict settings: failOnAllIssues and all beStrictAbout* options. The cache goes to cache/phpunit, which git already ignores.
  • Update the check composer script to run phpunit and rewrite it as an array.

Notes

  • The two entity-expansion tests now use expectExceptionMessageMatches with a regex. This replaces the tester wildcards, because the libxml message differs across versions.
  • The rename from .phpt to .php puts the test file under phpcs and phpstan for the first time. The file now follows the coding standard and passes phpstan on level max with strict rules.

- Replace nette/tester with phpunit/phpunit ^13.3.
- Convert XmlLoaderTest.phpt to a standard PHPUnit test.
- Add phpunit.xml.dist with cache in cache/phpunit.
- The test file now passes phpcs and phpstan checks.
- Enable failOnAllIssues and all beStrictAbout options.
- Require coverage metadata; add CoversClass attributes to the test.
- Rewrite the check composer script as an array.
@janedbal
janedbal merged commit 7e836db into master Aug 26, 2026
2 checks passed
@janedbal
janedbal deleted the phpunit-migration branch August 26, 2026 14:48
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