PHP Class PHPUnit_Framework_Constraint_StringContains, qcodo

Uses strpos() to find the position of the string in the input, if not found the evaluaton fails. The sub-string is passed in the constructor.
Author: Sebastian Bergmann ([email protected])
Inheritance: extends PHPUnit_Framework_Constraint
显示文件 Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$ignoreCase boolean
$string string

Public Methods

Method Description
__construct ( string $string, boolean $ignoreCase = FALSE )
evaluate ( mixed $other ) : boolean Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
toString ( ) : string Returns a string representation of the constraint.

Method Details

__construct() public method

public __construct ( string $string, boolean $ignoreCase = FALSE )
$string string
$ignoreCase boolean

evaluate() public method

Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
public evaluate ( mixed $other ) : boolean
$other mixed Value or object to evaluate.
return boolean

toString() public method

Returns a string representation of the constraint.
public toString ( ) : string
return string

Property Details

$ignoreCase protected_oe property

protected bool $ignoreCase
return boolean

$string protected_oe property

protected string $string
return string