ngyuki / phpunit-functions
PHPUnit Functions.php auto loader
Installs: 1 623
Dependents: 5
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2024-11-08 18:26:15 UTC
README
PHPUnit contains Functions.php
for shorthand of assertion.
// normally $this->assertThat($actual, $this->equalTo($expect)); // shorthand assertThat($actual, equalTo($expect));
This is very useful, but you need to explicitly load Functions.php
.
// I need to know location of Functions.php require_once __DIR__ . '/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php';
This is more difficult when running phpunit with phar.
// I need to know phar filename require_once 'phar://phpunit-6.2.phar/phpunit/Framework/Assert/Functions.php';
If you add ngyuki/phpunit-functions
to your project, Functions.php
will be loaded automatically.
composer require --dev ngyuki/phpunit-functions
Enjoy Testing!