expect / peridot-expect-plugin
Expectation for peridot
Installs: 8 182
Dependents: 19
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=5.6.0
- expect/expect: ~2.0
- peridot-php/peridot: ~1.18
Requires (Dev)
- beberlei/assert: ~2.6
- cloak/peridot-cloak-plugin: ~2.0
- cloak/robo-coveralls-kit: ~2.1
- codegyre/robo: ~0.7
- holyshared/robo-peridot: ~2.0
- phpspec/prophecy: ~1.6
README
Expectation for peridot
Installation
Installation that uses the composer
Please add the following items to composer.json.
Then please run the composer install.
{ "require-dev": { "expectation/peridot-expect-plugin": "3.0.0" } }
Basic usage
It can be used by simply append the set to peridot.php.
use expect\peridot\ExpectPlugin; return function(EventEmitterInterface $emitter) { ExpectPlugin::create()->registerTo($emitter); };
or
How to configure can be found here.
use expect\peridot\ExpectPlugin; return function(EventEmitterInterface $emitter) { ExpectPlugin::createWithConfig('.expect.toml')->registerTo($emitter); };
Examples of spec
You can easily use in the spec file.
describe('Example', function() { describe('#create', function() { it('return instance', function() { expect(Example::create())->toBeAnInstanceOf('Example') }); }); });