holyshared/peridot-file-fixture-plugin
File fixture for peridot
Maintainers
Package info
github.com/holyshared/peridot-file-fixture-plugin
pkg:composer/holyshared/peridot-file-fixture-plugin
1.0.3
2015-12-04 04:32 UTC
Requires
- php: >=5.5.0
- holyshared/file-fixture: ~1.0
- peridot-php/peridot: ~1.16
Requires (Dev)
- cloak/peridot-cloak-plugin: ~2.0
- cloak/robo-coveralls-kit: ~2.1
- codegyre/robo: ~0.5
- expect/peridot-expect-plugin: ~3.0
- peridot-php/peridot-dot-reporter: ~1.0
- phpspec/prophecy: ~1.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 52ccf790a51a133735a1d23e1a71d9cee5115967
- holyshared <holy.shared.design.woop@gmail.com>
README
👁 Build Status
👁 HHVM Status
👁 Coverage Status
👁 Scrutinizer Code Quality
👁 Dependency Status
👁 Stories in Ready
Basic usage
Register the plugin to be able to use in peridot.
Please the configuration file see the file-fixture.
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.
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); }); }); });
