Class ToHaveLength
Verify whether the value has a length that was expected.
$matcher = new ToHaveLength(3);
$matcher->match("foo"); //return true
$matcher->match("fo"); //return false
$matcher->match([ 1, 2 ]); //return false
$matcher->match(new ArrayIterator([ 1, 2 ])); //return false
- expect\matcher\ToHaveLength 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/ToHaveLength.php
Namespace: expect\matcher
Copyright: Noritaka Horio holy.shared.design@gmail.com
Author: Noritaka Horio holy.shared.design@gmail.com
Located at matcher/ToHaveLength.php
public
|
|
public
boolean
|
|
public
|
#
reportFailed(
Report the reason for the failure of positive evaluation. |
public
|
#
reportNegativeFailed(
Report the reason for the failure of negative evaluation. |