2017 © Pedro Peláez
 

library peridot-file-fixture-plugin

File fixture for peridot

image

holyshared/peridot-file-fixture-plugin

File fixture for peridot

  • Friday, December 4, 2015
  • by holyshared
  • Repository
  • 1 Watchers
  • 1 Stars
  • 741 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

peridot-file-fixture-plugin

Build Status HHVM Status Coverage Status Scrutinizer Code Quality Dependency Status Stories in Ready, (*1)

Basic usage

Register the plugin to be able to use in peridot.
Please the configuration file see the file-fixture., (*2)

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

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

By calling the loadFixture method in spec, you can load the fixture., (*3)

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);
        });
    });
});

The Versions