PHPUnit2
[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: PHPUnit2_Framework_Constraint_HasProperty

Source Location: /PHPUnit2-3.0.0alpha11/Framework/Constraint/HasProperty.php

Class Overview


Constraint which checks if a certain value is found in the input property.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>

Methods


Inherited Variables

Inherited Methods


Class Details

[line 74]
Constraint which checks if a certain value is found in the input property.

Uses in_property() to check if the value is found in the input property, if not found the evaluaton fails.

The property value is passed in the constructor and the optional constraint check can be set with the that() method.



[ Top ]


Method Detail

__construct (Constructor)   [line 84]

PHPUnit2_Framework_Constraint_HasProperty __construct( $property)

  • Access: public

Parameters:

   $property   — 

[ Top ]

evaluate   [line 105]

bool evaluate( mixed $other)

Evaluates the constraint for parameter $other. Returns TRUE if the constraint is met, FALSE otherwise.
  • Access: public

Parameters:

mixed   $other   —  Value or object to evaluate.

[ Top ]

fail   [line 139]

void fail( mixed $other, string $description)

  • Throws: PHPUnit2_Framework_ExpectationFailedException
  • Access: public

Parameters:

mixed   $other   —  The value passed to evaluate() which failed the constraint check.
string   $description   —  A string with extra description of what was going on while the evaluation failed.

[ Top ]

that   [line 89]

void that( PHPUnit2_Framework_Constraint $valueConstraint)

  • Access: public

Parameters:

PHPUnit2_Framework_Constraint   $valueConstraint   — 

[ Top ]

toString   [line 171]

string toString( )

Returns a string representation of the constraint.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.