PHP Класс PHPUnit_Framework_Constraint_ArrayHasKey, qcodo

Uses array_key_exists() to check if the key is found in the input array, if not found the evaluation fails. The array key is passed in the constructor.
Наследование: extends PHPUnit_Framework_Constraint
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$key integer | string

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

Метод Описание
__construct ( integer | string $key )
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.

Защищенные методы

Метод Описание
customFailureDescription ( mixed $other, string $description, boolean $not )

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

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

public __construct ( integer | string $key )
$key integer | string

customFailureDescription() защищенный Метод

protected customFailureDescription ( mixed $other, string $description, boolean $not )
$other mixed
$description string
$not 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

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

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

protected int|string $key
Результат integer | string