leo
leo copied to clipboard
Next level assertion and matcher library for PHP
This has been renamed to MatchClass (could not think of any better alternative)
Just installed by composer require --dev peridot-php/peridot peridot-php/leo $ ./vendor/bin/peridot PHP Parse error: syntax error, unexpected token "match" in /home/dev/onion/vendor/peridot-php/leo/specs/responder/responder.spec.php on line 18 $ php -v PHP 8.1.0 (cli) (built:...
This pull request contains a unfinished prototype for discussing an implementation of a feature. It would be good to be able to see not only that actual and expected results...
Currently, some specs are causing errors like the following under HHVM: ``` 1) assert ->doesNotThrow() should throw an exception if function throws exception: print_r() exceeded max bytes limit #0 ():...
The `Formatter` class uses `print_r($var, true)` to format an object by default. This works most of the time, but will result in an endless stream of garbage if the variable...
PHPUnit has `$this->setExpectedException('PHPUnit_Framework_Error_Warning');`. Leo should provide some way of doing this too. Something like this: ``` expect(function () { trigger_error('Oh no!', E_USER_WARNING); })->to->triggererror(E_USER_WARNING, 'Oh no!'); ```
it would be nice to be able to check for subsets or multiple items. ``` php expect($array)->to->include([1,2,3]); ```