PHP code example of peridot-php / leo

1. Go to this page and download the library: Download peridot-php/leo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

peridot-php / leo example snippets


expect($obj)->to->have->property('name');
expect($value)->to->be->ok
expect($fn)->to->throw('InvalidArgumentException', 'Expected message');
expect($array)->to->be->an('array');
expect($result)->to->not->be->empty;

use Peridot\Leo\Interfaces\Assert;

$assert = new Assert();
$assert->ok(true);
$assert->doesNotThrow($fn, 'Exception');
$assert->isResource(tmpfile());
$assert->notEqual($actual, $expected);