Download the PHP package phpnomad/tests without Composer
On this page you can find all versions of the php package phpnomad/tests. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpnomad/tests
More information about phpnomad/tests
Files in phpnomad/tests
Package tests
Short Description Testing library for PHPNomad
License proprietary
Homepage https://github.com/phpnomad/tests
Informations about the package tests
phpnomad/tests
phpnomad/tests is the shared PHPUnit base that PHPNomad packages use for their own unit tests. It provides a TestCase wired up with Mockery-PHPUnit integration and two reflection traits for reaching into protected or private state. If you're writing application code against PHPNomad, you don't need this package. If you're contributing to a PHPNomad package, its tests/ directory almost certainly already depends on it.
Installation
Pull it in as a dev dependency only. It isn't meant for production code paths.
What's included
PHPNomad\Tests\TestCaseextendsPHPUnit\Framework\TestCaseand mixes inMockeryPHPUnitIntegration, so Mockery expectations are verified and containers cleaned up automatically between tests.PHPNomad\Tests\Traits\WithInaccessibleMethodsprovidescallInaccessibleMethod()for invoking protected or private methods through reflection.PHPNomad\Tests\Traits\WithInaccessiblePropertiesprovidesgetProtectedProperty(),getProtectedPropertyValue(), andsetProtectedProperty()for reading and writing protected or private properties through reflection.
Usage pattern
Each PHPNomad package defines its own package-local TestCase that extends the shared one. That gives the package its own namespace root under Tests/ while inheriting the PHPUnit and Mockery plumbing.
Concrete unit tests then extend the package-local TestCase and mix in whichever traits they need.
Documentation
Framework-wide documentation lives at phpnomad.com.
License
MIT. See LICENSE.txt.
All versions of tests with dependencies
friendsofphp/php-cs-fixer Version ^3.13
phpunit/phpunit Version ^9.5 || ^11.0
mockery/mockery Version ^1.5
phpstan/phpstan-mockery Version ^2.0
phpstan/extension-installer Version ^1.2