You could use is cross php version 5.5 -> 8.x
| phpunit | PMVC/unit |
|---|---|
| __construct | pmvc_init |
| setup | pmvc_setup |
| teardown | pmvc_teardown |
| assertContains | haveString |
| assertStringContainsString | haveString |
| assertStringContainsString | haveString |
| getMockBuilder | getPMVCMockBuilder |
| setMethods | pmvc_onlyMethods |
| onlyMethods | pmvc_onlyMethods |
<?php
$path = __DIR__ . '/../vendor/autoload.php';
include $path;
\PMVC\Load::plug(
['unit' => null],
[__DIR__ . '/../../']
);<?php
namespace PMVC\PlugIn\hell_world;
use PMVC\TestCase;
class HelloWorldTest extends TestCase
{
}- Simple plugin
- More php version
- Real CircleCI example
- Show event
phpunit --log-events-text php://stdout
- show deprecations
phpunit --display-deprecations --testdox
-
output debug info
$this->dump(/*anything*/); //fwrite(STDERR, print_r(?, true));
-
trigger PMVC dev dump
-
Further integration with the [dev] plugin.
\PMVC\plug('dev')->debug_with_cli(); \PMVC\d(/*something*/);
- mkdir test_folder
- curl -sS https://getcomposer.org/installer | php
- vim composer.json
{
"require": {
"pmvc-plugin/unit": "dev-master"
}
}- php composer.phar install
- php composer.phar require pmvc-plugin/unit
- or
- composer require pmvc-plugin/unit