PHP code example of driade / sleepery

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

    

driade / sleepery example snippets


Driade\Sleepery::dream(1);

Driade\Sleepery::nap(1000);


use Driade\Sleepery;

Sleepery::fake();

(new PerformAction)->handle(); // execute your code

Sleepery::wakeup();

//

Sleepery::assertDreamt(1);
Sleepery::assertNapped(1000);

Sleepery::assertNeverDreamt(); // no call to sleep() was made

Sleepery::assertNeverNapped(); // no call to usleep() was made

Sleepery::getDreams(); // returns all the dream() calls while dreaming

Sleepery::getNaps(); // returns all the nap() calls while dreaming

Sleepery::wakeup(); // stop dreaming