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
Afficher le fichier Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Свойство Type Description
$ignoreCase boolean
$string string

Méthodes publiques

Méthode 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 méthode

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

evaluate() public méthode

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.
Résultat boolean

toString() public méthode

Returns a string representation of the constraint.
public toString ( ) : string
Résultat string

Property Details

$ignoreCase protected_oe property

protected bool $ignoreCase
Résultat boolean

$string protected_oe property

protected string $string
Résultat string