2017 © Pedro Peláez
 

library predict-output

Prediction package for CLI output

image

try/predict-output

Prediction package for CLI output

  • Saturday, October 21, 2017
  • by troublete
  • Repository
  • 1 Watchers
  • 0 Stars
  • 58 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

predict-output

Prediction package for CLI output, (*1)

Build Status, (*2)

Install

$ composer require try/predict-output

Usage

<?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

API

Methods

predictOutput($capture, $content)

Method to compare an output capture with a given string., (*3)

Arguments
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.

License

GPL-2.0 © Willi Eßer, (*4)

The Versions

21/10 2017

dev-master

9999999-dev

Prediction package for CLI output

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Willi Eßer

21/10 2017

1.0.0

1.0.0.0

Prediction package for CLI output

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

by Willi Eßer