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 ToBeAn

Verify whether the value is of a type that expect.

$matcher = new ToBeAn('string');
$matcher->match('foo'); //return true

$matcher->match(1); //return false
expect\matcher\ToBeAn 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/ToBeAn.php
Methods summary
public
# __construct( $expected )

Create a new matcher.

Create a new matcher.

Parameters

$expected
value
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