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

Class: PHPUnit_Assert

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

Class Overview


A set of assert methods.


Author(s):

Copyright:

  • Copyright &copy; 2002-2004 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 27]
A set of assert methods.


[ Top ]


Method Detail

assertContains   [line 43]

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

Asserts that a haystack contains a needle.
  • Since: 1.1.0
  • Access: public

Parameters:

mixed   $needle     
mixed   $haystack     
string   $message     

[ Top ]

assertEquals   [line 89]

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 212]

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

Asserts that a condition is false.
  • Access: public

Parameters:

boolean   $condition     
string   $message     

[ Top ]

assertNotContains   [line 66]

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

Asserts that a haystack does not contain a needle.
  • Since: 1.1.0
  • Access: public

Parameters:

mixed   $needle     
mixed   $haystack     
string   $message     

[ Top ]

assertNotNull   [line 155]

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

Asserts that an object isn't null.
  • Access: public

Parameters:

object   $object     
string   $message     

[ Top ]

assertNotRegExp   [line 255]

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

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

Parameters:

string   $pattern     
string   $string     
string   $message     

[ Top ]

assertNull   [line 174]

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

Asserts that an object is null.
  • Access: public

Parameters:

object   $object     
string   $message     

[ Top ]

assertRegExp   [line 232]

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 ]

assertTrue   [line 193]

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

Asserts that a condition is true.
  • Access: public

Parameters:

boolean   $condition     
string   $message     

[ Top ]

assertType   [line 277]

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 320]

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 307]

void setLooselyTyped( boolean $looselyTyped)

  • Access: public

Parameters:

boolean   $looselyTyped     

[ Top ]


Documentation generated on Fri, 5 Nov 2004 17:20:06 -0500 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.