2017 © Pedro Peláez
 

library eris-runner

image

md/eris-runner

  • Monday, August 28, 2017
  • by md
  • Repository
  • 0 Watchers
  • 5 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Eris Runner

Eris Runner is a test runner for Eris, (*1)

With this runner you don't need an extra testing framework to run your Property Based Testing., (*2)

All you need is a directory or a file with properties written like this:, (*3)


<?php property ("strings have the same length in reverse", function() { forAll (Gen::string()) (function ($s) { Assert::same(strlen($s), strlen(strrev($s))); }); }); property ("positive integers squared are always bigger than themselves", function() { forAll (Gen::integer()) // ok zero * zero is still zero ->when (function($x) { return $x > 0; }) ->then (function ($x) { // Should fail! Did you think about 1? ;-) Assert::greaterThan($x * $x, $x); }); });

Then just call the runner to run all tests in the tests folder:, (*4)

$ bin/eris tests

Or a single php file:, (*5)

$ bin/eris my_test.php

Note that Eris Runner lets you use Webmozart's Assert library as assertions. But you can use whatever you like. Just make sure you throw some exception., (*6)

The Versions

28/08 2017

dev-master

9999999-dev

  Sources   Download

The Requires

 

28/08 2017