Integrate Coduo php matcher into PHPSpec
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
features
src/Coduo/PHPSpec/Matcher
.gitignore
.travis.yml
LICENCE
README.md
composer.json

README.md

PHPSpec2 coduo matcher extension

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.