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

Class: PHPUnit_Assert

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

Class Overview


A set of assert methods.


Author(s):

Copyright:

  • Copyright &copy; 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 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 274]

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

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

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

Parameters:

mixed   $actual   — 
string   $message   — 

[ Top ]

assertNotRegExp   [line 317]

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 ]

assertNotSame   [line 189]

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

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

Asserts that a variable is NULL.
  • Access: public

Parameters:

mixed   $actual   — 
string   $message   — 

[ Top ]

assertRegExp   [line 294]

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

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

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

Asserts that a condition is true.
  • Access: public

Parameters:

boolean   $condition   — 
string   $message   — 

[ Top ]

assertType   [line 339]

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

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

void setLooselyTyped( boolean $looselyTyped)

  • Access: public

Parameters:

boolean   $looselyTyped   — 

[ Top ]


Documentation generated on Thu, 10 Dec 2015 05:37:22 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.