PHP code example of loophp / phpspec-time

1. Go to this page and download the library: Download loophp/phpspec-time 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/ */

    

loophp / phpspec-time example snippets


    $this
        ->shouldTakeMoreThan(10)
        ->during('method');

    $this
        ->shouldNotTakeMoreThan(10)
        ->during('method');

    $this
        ->shouldTakeLessThan(10)
        ->during('method');

    $this
        ->shouldNotTakeLessThan(10)
        ->during('method');

    $this
        ->shouldTakeInBetween(3.0, 3.2)
        ->during('method');

    $this
        ->shouldNotTakeInBetween(3.0, 3.2)
        ->during('method');