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

Class: PHPUnit_Assert

Source Location: /PHPUnit-1.3.2/PHPUnit/Assert.php

Class Overview


A set of assert methods.


Author(s):

Version:

  • Release: @package_version@

Copyright:

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

Methods


Child classes:

PHPUnit_TestCase
A TestCase defines the fixture to run multiple tests.

Inherited Variables

Inherited Methods


Class Details

[line 61]
A set of assert methods.


[ Top ]


Method Detail

assertContains   [line 77]

void assertContains( mixed $needle, mixed $haystack, [string $message = ''])

Asserts that a haystack contains a needle.
  • Since: Method available since Release 1.1.0
  • Access: public

Parameters:

mixed   $needle     
mixed   $haystack     
string   $message     

[ Top ]

assertEquals   [line 123]

void assertEquals( mixed $expected, mixed $actual, [string $message = ''], [mixed $delta = 0])

Asserts that two variables are equal.
  • Access: public

Parameters:

mixed   $expected     
mixed   $actual     
string   $message     
mixed   $delta     

[ Top ]

assertFalse   [line 308]

void assertFalse( boolean $condition, [string $message = ''])

Asserts that a condition is false.
  • Access: public

Parameters:

boolean   $condition     
string   $message     

[ Top ]

assertNotContains   [line 100]

void assertNotContains( mixed $needle, mixed $haystack, [string $message = ''])

Asserts that a haystack does not contain a needle.
  • Since: Method available since Release 1.1.0
  • Access: public

Parameters:

mixed   $needle     
mixed   $haystack     
string   $message     

[ Top ]

assertNotNull   [line 251]

void assertNotNull( mixed $actual, [string $message = ''])

Asserts that a variable is not NULL.
  • Access: public

Parameters:

mixed   $actual     
string   $message     

[ Top ]

assertNotRegExp   [line 351]

void assertNotRegExp( string $pattern, string $string, [string $message = ''])

Asserts that a string does not match a given regular expression.
  • Since: Method available since Release 1.1.0
  • Access: public

Parameters:

string   $pattern     
string   $string     
string   $message     

[ Top ]

assertNotSame   [line 223]

void assertNotSame( object $expected, object $actual, [string $message = ''])

Asserts that two variables do not reference the same object.

This requires the Zend Engine 2 to work.

  • Deprecated:
  • Access: public

Parameters:

object   $expected     
object   $actual     
string   $message     

[ Top ]

assertNull   [line 270]

void assertNull( mixed $actual, [string $message = ''])

Asserts that a variable is NULL.
  • Access: public

Parameters:

mixed   $actual     
string   $message     

[ Top ]

assertRegExp   [line 328]

void assertRegExp( string $pattern, string $string, [string $message = ''])

Asserts that a string matches a given regular expression.
  • Access: public

Parameters:

string   $pattern     
string   $string     
string   $message     

[ Top ]

assertSame   [line 192]

void assertSame( object $expected, object $actual, [string $message = ''])

Asserts that two variables reference the same object.

This requires the Zend Engine 2 to work.

  • Deprecated:
  • Access: public

Parameters:

object   $expected     
object   $actual     
string   $message     

[ Top ]

assertTrue   [line 289]

void assertTrue( boolean $condition, [string $message = ''])

Asserts that a condition is true.
  • Access: public

Parameters:

boolean   $condition     
string   $message     

[ Top ]

assertType   [line 373]

void assertType( string $expected, mixed $actual, [optional $message = ''])

Asserts that a variable is of a given type.
  • Access: public

Parameters:

string   $expected     
mixed   $actual     
optional   $message     string $message

[ Top ]

fail   [line 416]

void fail( [string $message = ''])

Fails a test with the given message.
  • Abstract:
  • Access: protected

Overridden in child classes as:

PHPUnit_TestCase::fail()
Fails a test with the given message.

Parameters:

string   $message     

[ Top ]

setLooselyTyped   [line 403]

void setLooselyTyped( boolean $looselyTyped)

  • Access: public

Parameters:

boolean   $looselyTyped     

[ Top ]


Documentation generated on Thu, 10 Nov 2005 05:02:21 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.