[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/simpletestlib/extensions/ -> phpunit_test_case.php (summary)

adapter for SimpleTest to use PHPUnit test cases

Version: $Id$
File Size: 96 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

TestCase:: (7 methods):
  TestCase()
  assert()
  assertEquals()
  assertEqualsMultilineStrings()
  assertRegexp()
  error()
  name()


Class: TestCase  - X-Ref

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

TestCase($label)   X-Ref
Constructor. Sets the test name.

param: $label        Test name to display.

assert($condition, $message = false)   X-Ref
Sends pass if the test condition resolves true,
a fail otherwise.

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

assertEquals($first, $second, $message = false)   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.

assertEqualsMultilineStrings($first, $second, $message = false)   X-Ref
Simple string equality.

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

assertRegexp($pattern, $subject, $message = false)   X-Ref
Tests a regex match.

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

error($message)   X-Ref
Sends an error which we interpret as a fail
with a different message for compatibility.

param: $message        Message to display.

name()   X-Ref
Accessor for name.




Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7