PMVC Test Framework

0.0.13 2021-05-20 09:38 UTC

This package is auto-updated.

Last update: 2021-10-14 11:30:48 UTC


README

Latest Stable Version Latest Unstable Version Build Status License Total Downloads

A simple phpunit wrapper let it support phpunt 4.8.35, 6.5.5, 9.5.0

In another word.

You could use is cross php version 5.5 -> 8.x

function mapping table

phpunit PMVC/unit
setup pmvc_setup
teardown pmvc_teardown
assertContains haveString
assertStringContainsString haveString

tests/include.php example

<?php

$path = __DIR__ . '/../vendor/autoload.php';
include $path;

\PMVC\Load::plug(
    ['unit' => null],
    [__DIR__ . '/../../']
);

Install with Composer

1. Download composer

2. Install by composer.json or use command-line directly

2.1 Install by composer.json

  • vim composer.json
{
    "require": {
        "pmvc-plugin/unit": "dev-master"
    }
}
  • php composer.phar install

2.2 Or use composer command-line

  • php composer.phar require pmvc-plugin/unit