PHP Класс 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.
Автор: Sebastian Bergmann ([email protected])
Наследование: extends PHPUnit_Framework_Constraint
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$ignoreCase boolean
$string string

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

evaluate() публичный Метод

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.
Результат boolean

toString() публичный Метод

Returns a string representation of the constraint.
public toString ( ) : string
Результат string

Описание свойств

$ignoreCase защищенное свойство

protected bool $ignoreCase
Результат boolean

$string защищенное свойство

protected string $string
Результат string