expectation / peridot-expectation
This package is abandoned and no longer maintained.
The author suggests using the expectation/peridot-expect-plugin package instead.
Expectation for peridot
Package info
github.com/expectation-php/peridot-expect-plugin
pkg:composer/expectation/peridot-expectation
4.0.0
2016-08-10 03:31 UTC
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
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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') }); }); });