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_Framework_TestCase
A TestCase defines the fixture to run multiple tests.
PHPUnit2_Extensions_TestDecorator
A Decorator for Tests.

Inherited Variables

Inherited Methods


Class Details

[line 32]
A set of assert methods.


[ Top ]


Method Detail

__construct (Constructor)   [line 50]

PHPUnit2_Framework_Assert __construct( )

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

Overridden in child classes as:

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

[ Top ]

assertEquals   [line 65]

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

Asserts that two variables are equal.
  • 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.
  • Access: public

Parameters:

boolean   $condition   — 
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 ]

assertNotSame   [line 204]

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

Asserts that two objects refer not to the same object.
  • Access: public

Parameters:

object   $object   — 
string   $message   — 
   $expected   — 
   $actual   — 

[ Top ]

assertNull   [line 170]

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

Asserts that an object is null.
  • 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.
  • Access: public

Parameters:

string   $expected   — 
string   $actual   — 
string   $message   — 

[ Top ]

assertSame   [line 186]

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

Asserts that two objects refer to the same object.
  • Access: public

Parameters:

object   $object   — 
string   $message   — 
   $expected   — 
   $actual   — 

[ Top ]

assertTrue   [line 123]

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

Asserts that a condition is true.
  • 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.
  • Access: public

Parameters:

string   $expected   — 
mixed   $actual   — 
string   $message   — 

[ Top ]

fail   [line 269]

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

Fails a test with the given message.
  • Throws: PHPUnit2_Framework_AssertionFailedError
  • Access: public

Parameters:

string   $message   — 

[ Top ]

format   [line 283]

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

  • Access: public

Parameters:

mixed   $expected   — 
mixed   $actual   — 
string   $message   — 

[ Top ]

setLooselyTyped   [line 302]

void setLooselyTyped( boolean $looselyTyped)

  • Access: public

Parameters:

boolean   $looselyTyped   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:55:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.