dev-master
9999999-devPrediction package for CLI output
GPL-2.0
The Requires
The Development Requires
by Willi Eßer
1.0.0
1.0.0.0Prediction package for CLI output
GPL-2.0
The Requires
The Development Requires
by Willi Eßer
Wallogit.com
2017 © Pedro Peláez
Prediction package for CLI output
Prediction package for CLI output, (*1)
$ composer require try/predict-output
<?php
require_once '/path/to/autoload.php';
use TryPhp\PredictOutputTrait;
$assertions = new class() {
use PredictOutputTrait();
}
$assertions->predictOutput(function () {
echo '\e[33msomething\n';
}, 'something'); // won't throw an exception
$assertions->predictOutput(function () {
echo '\e[33msomething\n';
}, 'something other'); // will throw an exception
predictOutput($capture, $content)Method to compare an output capture with a given string., (*3)
| Arguments | Type | Description |
|---|---|---|
| $capture | callable |
Closure from which every output buffer write will be captured. |
| $content | string |
Content to which the output will be compared to. |
GPL-2.0 © Willi Eßer, (*4)
Prediction package for CLI output
GPL-2.0
Prediction package for CLI output
GPL-2.0