PHP Класс PHPUnit_Framework_Constraint_IsInstanceOf, qcodo

The expected class name is passed in the constructor.
Наследование: extends PHPUnit_Framework_Constraint
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
__construct ( string $className )
evaluate ( mixed $other ) : boolean Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
fail ( mixed $other, string $description, boolean $not = FALSE ) Creates the appropriate exception for the constraint which can be caught by the unit test system. This can be called if a call to evaluate() fails.
toString ( ) : string Returns a string representation of the constraint.

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

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

public __construct ( string $className )
$className string

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

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

Creates the appropriate exception for the constraint which can be caught by the unit test system. This can be called if a call to evaluate() fails.
public fail ( mixed $other, string $description, boolean $not = FALSE )
$other mixed The value passed to evaluate() which failed the constraint check.
$description string A string with extra description of what was going on while the evaluation failed.
$not boolean Flag to indicate negation.

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

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

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

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

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