Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Latest commit

 

History

History
44 lines (31 loc) · 762 Bytes

README.md

File metadata and controls

44 lines (31 loc) · 762 Bytes

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.