Overview

Namespaces

  • expect
    • config
    • configurator
    • context
    • factory
    • matcher
      • strategy
    • package
    • registry
    • reporter

Classes

  • PatternMatcher
  • ToBe
  • ToBeA
  • ToBeAbove
  • ToBeAn
  • ToBeAnInstanceOf
  • ToBeArray
  • ToBeBelow
  • ToBeBoolean
  • ToBeEmpty
  • ToBeFalse
  • ToBeFalsey
  • ToBeFloat
  • ToBeGreaterThan
  • ToBeInteger
  • ToBeLessThan
  • ToBeNull
  • ToBeString
  • ToBeTrue
  • ToBeTruthy
  • ToBeWithin
  • ToContain
  • ToEndWith
  • ToEqual
  • ToHaveKey
  • ToHaveLength
  • ToMatch
  • ToPrint
  • ToStartWith
  • ToThrow
  • TruthyMatcher

Interfaces

  • ReportableMatcher

Traits

  • EqualMatcherDelegatable
  • GreaterThanMatcherDelegatable
  • LengthMatcherDelegatable
  • LessThanMatcherDelegatable
  • TypeMatcherDelegatable
  • Overview
  • Namespace
  • Class

Class ToMatch

Verify match the regular expression.

$matcher = new ToMatch('/foo/'); $matcher->match('foobar'); //return true

$matcher->match('bar'); //return false

expect\matcher\ToMatch implements expect\matcher\ReportableMatcher
Final
Namespace: expect\matcher
Copyright: Noritaka Horio holy.shared.design@gmail.com
Author: Noritaka Horio holy.shared.design@gmail.com
Located at matcher/ToMatch.php
Methods summary
public
# __construct( string $expected )

Parameters

$expected
String of a regular expression
public boolean
# match( mixed $actual )

Verify whether the value is consistent with what is expected. Returns true if the value matches the contents to be expected.

Verify whether the value is consistent with what is expected. Returns true if the value matches the contents to be expected.

Parameters

$actual
value of actual

Returns

boolean
results of evaluation

Implementation of

expect\Matcher::match()
public
# reportFailed( expect\FailedMessage $message )

Report the reason for the failure of positive evaluation.

Report the reason for the failure of positive evaluation.

Parameters

$message
message

Implementation of

expect\matcher\ReportableMatcher::reportFailed()
public
# reportNegativeFailed( expect\FailedMessage $message )

Report the reason for the failure of negative evaluation.

Report the reason for the failure of negative evaluation.

Parameters

$message
message

Implementation of

expect\matcher\ReportableMatcher::reportNegativeFailed()
Expect API documentation generated by ApiGen