1. Go to this page and download the library: Download hojabbr/laravel-social 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/ */
Sleep::for($driver->rateProfile()->pauseMsFor($messages))->milliseconds();
$health = $driver->health(); // never throws
$health->isUsable();
$health->details;
$health->error;
use Hojabbr\Social\Testing\FakeDriver;
$fake = FakeDriver::fake('instagram');
$fake->willReturn(PublishResult::rejected('Caption too long.'));
// … run the code under test …
expect($fake->requests)->toHaveCount(1)
->and($fake->lastRequest()?->body)->toContain('#bourse');