PHP code example of alnutile / fixtures

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

    

alnutile / fixtures example snippets

 
$data = get_fixture('foo_get_response.json')
Http::fake(
    [
        'foo.com/*' => Http::response($data, 200)
    ]
);
 
$data = File::get(base_path(sprintf(
            'tests/fixtures/%s',
            $file_name
        )));

$data = json_decode($results, true);
 
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            //some stuff is here
        },
        "files": [
            "vendor/alnutile/fixtures/src/helpers.php"
        ]
    },
bash 
composer dump