coduo / phpspec-matcher-extension
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 2
Forks: 3
Open Issues: 0
pkg:composer/coduo/phpspec-matcher-extension
Requires
- php: >=5.3.0
- coduo/php-matcher: 1.0.*
- phpspec/phpspec: 2.0.*
Requires (Dev)
- behat/behat: 2.4.*@stable
- bossa/phpspec2-expect: 1.0.*
- symfony/filesystem: ~2.3
This package is auto-updated.
Last update: 2021-03-20 00:01:38 UTC
README
This extension integrate Coduo PHP Matcher into PHPSpec
##Installation
Add to your composer.json
require: {
"coduo/phpspec-matcher-extension": "dev-master"
}
##Usage
Configure phpspec
# phpspec.yml
extensions:
- Coduo\PhpSpec\Matcher\Extension
Write spec:
<?php namespace spec\Coduo; use PhpSpec\ObjectBehavior; class UserSpec extends ObjectBehavior { function it_always_have_salt() { $this->getSalt()->shouldMatchPattern('@string@'); $this->getSalt()->shouldNotMatchPattern('@integer@'); } }
From now you should be able to use additional matcher matchPattern
in PHPSpec.