2017 © Pedro Peláez
 

library predict-is

Simple comparison prediction for scalar values

image

try/predict-is

Simple comparison prediction for scalar values

  • Thursday, October 26, 2017
  • by troublete
  • Repository
  • 1 Watchers
  • 0 Stars
  • 49 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

predict-is

Simple comparison prediction for scalar values, (*1)

Build Status, (*2)

Install

$ composer require try/predict-is

Usage

<?php
require_once '/path/to/autoload.php';

use TryPhp\PredictIsTrait;

$assertions = new class() {
    use PredictIsTrait();
} 

$assertions->is(3, 3); // won't throw an exception

$assertions->predictException('something', 'something else'); // will throw an exception

API

Methods

is($actual, $expected)

Method to compare scalar values and throw an Exception if they do not equal., (*3)

Arguments
Arguments Type Description
$actual mixed Actual value that shall be checked.
$expected mixed Expected value $actual is compared to.

License

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

The Versions

26/10 2017

dev-master

9999999-dev

Simple comparison prediction for scalar values

  Sources   Download

GPL-2.0

by Willi Eßer

26/10 2017

1.0.0

1.0.0.0

Simple comparison prediction for scalar values

  Sources   Download

GPL-2.0

by Willi Eßer