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

Class: PHPUnit2_Framework_Assert

Source Location: /PHPUnit2-2.0.3/Framework/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:

PHPUnit2_Extensions_TestDecorator
A Decorator for Tests.
PHPUnit2_Framework_TestCase
A TestCase defines the fixture to run multiple tests.

Inherited Variables

Inherited Methods


Class Details

[line 32]
A set of assert methods.


[ Top ]


Method Detail

assertEquals   [line 65]

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

Asserts that two variables are equal.
  • Static: This method can be called statically
  • Access: public

Parameters:

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

[ Top ]

assertFalse   [line 140]

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

Asserts that a condition is false.
  • Static: This method can be called statically
  • Access: public

Parameters:

boolean   $condition     
string   $message     

[ Top ]

assertNotNull   [line 155]

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

Asserts that an object isn't null.
  • Static: This method can be called statically
  • Access: public

Parameters:

object   $object     
string   $message     

[ Top ]

assertNotSame   [line 204]

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

Asserts that two objects refer not to the same object.
  • Static: This method can be called statically
  • Access: public

Parameters:

object   $object     
string   $message     

[ Top ]

assertNull   [line 170]

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

Asserts that an object is null.
  • Static: This method can be called statically
  • Access: public

Parameters:

object   $object     
string   $message     

[ Top ]

assertRegExp   [line 252]

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

Asserts that a string matches a given regular expression.
  • Static: This method can be called statically
  • Access: public

Parameters:

string   $expected     
string   $actual     
string   $message     

[ Top ]

assertSame   [line 186]

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

Asserts that two objects refer to the same object.
  • Static: This method can be called statically
  • Access: public

Parameters:

object   $object     
string   $message     

[ Top ]

assertTrue   [line 123]

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

Asserts that a condition is true.
  • Static: This method can be called statically
  • Access: public

Parameters:

boolean   $condition     
string   $message     

[ Top ]

assertType   [line 223]

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

Asserts that a variable is of a given type.
  • Static: This method can be called statically
  • Access: public

Parameters:

string   $expected     
mixed   $actual     
string   $message     

[ Top ]

fail   [line 269]

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

Fails a test with the given message.
  • Static: This method can be called statically
  • Access: public
  • Throws: PHPUnit2_Framework_AssertionFailedError

Parameters:

string   $message     

[ Top ]

format   [line 283]

void format( mixed $expected, mixed $actual, string $message)

  • Static: This method can be called statically
  • Access: public

Parameters:

mixed   $expected     
mixed   $actual     
string   $message     

[ Top ]

setLooselyTyped   [line 302]

void setLooselyTyped( boolean $looselyTyped)

  • Static: This method can be called statically
  • Access: public

Parameters:

boolean   $looselyTyped     

[ Top ]

__construct   [line 50]

void __construct( )

Protect constructor since it is a static only class.
  • Access: protected

Overridden in child classes as:

PHPUnit2_Extensions_TestDecorator::__construct()
Constructor.
PHPUnit2_Extensions_RepeatedTest::__construct()
Constructor.
PHPUnit2_Framework_TestCase::__construct()
Constructs a test case with the given name.
PHPUnit2_Extensions_ExceptionTestCase::__construct()
PHPUnit2_Framework_Warning::__construct()

[ Top ]


Documentation generated on Mon, 27 Sep 2004 04:10:15 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.