PHP code example of holyshared / peridot-file-fixture-plugin

1. Go to this page and download the library: Download holyshared/peridot-file-fixture-plugin 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/ */

    

holyshared / peridot-file-fixture-plugin example snippets


use Evenement\EventEmitterInterface;
use holyshared\peridot\FileFixturePlugin;

return function(EventEmitterInterface $emitter)
{
    $plugin = new FileFixturePlugin(__DIR__ . '/fixtures.toml');
    $plugin->registerTo($emmiter);
};

describe('Example', function() {
    describe('output', function() {
        it('return message for user', function() {
            $content = $this->loadFixture('text:console', [ 'name' => 'Jhon' ]);
            expect('My name is Jhon')->toEqual($content);
        });
    });
});