[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/lib/simpletest/extensions/ -> pear_test_case.php (summary)

adapter for SimpleTest to use PEAR PHPUnit test cases

Version: $Id: pear_test_case.php 5999 2007-06-18 13:13:08Z pachanga $
File Size: 198 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PHPUnit_TestCase:: (14 methods):
  PHPUnit_TestCase()
  assertEquals()
  assertNotNull()
  assertNull()
  assertSame()
  assertNotSame()
  assertTrue()
  assertFalse()
  assertRegExp()
  assertType()
  setLooselyTyped()
  countTestCases()
  getName()
  setName()


Class: PHPUnit_TestCase  - X-Ref

Adapter for PEAR PHPUnit test case to allow
legacy PEAR test cases to be used with SimpleTest.

PHPUnit_TestCase($label = false)   X-Ref
Constructor. Sets the test name.

param: $label        Test name to display.

assertEquals($first, $second, $message = "%s", $delta = 0)   X-Ref
Will test straight equality if set to loose
typing, or identity if not.

param: $first          First value.
param: $second         Comparison value.
param: $message        Message to display.

assertNotNull($value, $message = "%s")   X-Ref
Passes if the value tested is not null.

param: $value          Value to test against.
param: $message        Message to display.

assertNull($value, $message = "%s")   X-Ref
Passes if the value tested is null.

param: $value          Value to test against.
param: $message        Message to display.

assertSame(&$first, &$second, $message = "%s")   X-Ref
In PHP5 the identity test tests for the same
object. This is a reference test in PHP4.

param: $first          First object handle.
param: $second         Hopefully the same handle.
param: $message        Message to display.

assertNotSame(&$first, &$second, $message = "%s")   X-Ref
In PHP5 the identity test tests for the same
object. This is a reference test in PHP4.

param: $first          First object handle.
param: $second         Hopefully a different handle.
param: $message        Message to display.

assertTrue($condition, $message = "%s")   X-Ref
Sends pass if the test condition resolves true,
a fail otherwise.

param: $condition      Condition to test true.
param: $message        Message to display.

assertFalse($condition, $message = "%s")   X-Ref
Sends pass if the test condition resolves false,
a fail otherwise.

param: $condition      Condition to test false.
param: $message        Message to display.

assertRegExp($pattern, $subject, $message = "%s")   X-Ref
Tests a regex match. Needs refactoring.

param: $pattern        Regex to match.
param: $subject        String to search in.
param: $message        Message to display.

assertType($value, $type, $message = "%s")   X-Ref
Tests the type of a value.

param: $value          Value to take type of.
param: $type           Hoped for type.
param: $message        Message to display.

setLooselyTyped($loosely_typed)   X-Ref
Sets equality operation to act as a simple equal
comparison only, allowing a broader range of
matches.

param: $loosely_typed     True for broader comparison.

countTestCases()   X-Ref
For progress indication during
a test amongst other things.

return: Usually one.

getName()   X-Ref
Accessor for name, normally just the class
name.


setName($name)   X-Ref
Does nothing. For compatibility only.

param: $name        Dummy



Generated: Sat Nov 22 03:48:54 2008 Cross-referenced by PHPXref 0.7