php-parallel-lint / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
282 stars 21 forks source link

Tests: switch to PHPUnit #110

Closed jrfnl closed 2 years ago

jrfnl commented 2 years ago

Note: This PR will be easiest to review by looking at each commit individually.

Fixes #90


Tests: switch to PHPUnit - set up the basics

Tests: add test bootstrap and basic UnitTestCase

Note: the name UnitTestCase file has been chosen deliberately as this package is typically a package which could benefit from having both unit as well as integration tests and naming the file/class UnitTestCase allows for adding an IntegrationTestCase base class later on.

Tests: switch to using the PHPUnit test runner

Includes:

Tests: switch to using the PHPUnit assertions and expectations

Includes:

Tests: use the PL_TESTROOT constant

... as declared in the test bootstrap file to allow for more stability when test files get moved around.

Tests: re-organize test directory structure

grogy commented 2 years ago

Thank you :blue_heart:

jrfnl commented 2 years ago

Your commits are as a guide "How to replace Nette Tester with PHPUnit"

😄 Nice! Oh and if it weren't for the fact that PHP 5.3 is still supported in this package, I would have added the PHPUnit Polyfills as well instead of having our "own" polyfilled functions in the TestCase class.

We could maybe consider dropping support for PHP 5.3 in the 2.0 version ?