Class TestCase

Description

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

Located in /libraries/pear/simpletest/extensions/phpunit_test_case.php (line 24)

RunnableTest
   |
   --SimpleTestCase
      |
      --TestCase
Direct descendents
Class Description
 class TestOfPhpUnitAdapter Adapter for sourceforge PHPUnit test case to allow legacy test cases to be used with SimpleTest.
Method Summary
 TestCase TestCase ($label $label)
 void assert ($condition $condition, [$message $message = false])
 void assertEquals ($first $first, $second $second, [$message $message = false])
 void assertEqualsMultilineStrings ($first $first, $second $second, [$message $message = false])
 void assertRegexp ($pattern $pattern, $subject $subject, [$message $message = false])
 void error ($message $message)
 void name ()
Variables

Inherited Variables

Inherited from SimpleTestCase

SimpleTestCase::$_reporter

Inherited from RunnableTest

RunnableTest::$_label
Methods
Constructor TestCase (line 31)

Constructor. Sets the test name.

  • public:
TestCase TestCase ($label $label)
  • $label $label: Test name to display.
assert (line 42)

Sends pass if the test condition resolves true, a fail otherwise.

  • public:
void assert ($condition $condition, [$message $message = false])
  • $condition $condition: Condition to test true.
  • $message $message: Message to display.
assertEquals (line 54)

Will test straight equality if set to loose typing, or identity if not.

  • public:
void assertEquals ($first $first, $second $second, [$message $message = false])
  • $first $first: First value.
  • $second $second: Comparison value.
  • $message $message: Message to display.
assertEqualsMultilineStrings (line 69)

Will test straight equality if set to loose typing, or identity if not.

  • public:
void assertEqualsMultilineStrings ($first $first, $second $second, [$message $message = false])
  • $first $first: First value.
  • $second $second: Comparison value.
  • $message $message: Message to display.
assertRegexp (line 83)

Tests a regex match.

  • public:
void assertRegexp ($pattern $pattern, $subject $subject, [$message $message = false])
  • $pattern $pattern: Regex to match.
  • $subject $subject: String to search in.
  • $message $message: Message to display.
error (line 96)

Sends an error which we interpret as a fail with a different message for compatibility.

  • public:
void error ($message $message)
  • $message $message: Message to display.

Redefinition of:
SimpleTestCase::error()
Formats a PHP error and dispatches it to the runner.
name (line 104)

Accessor for name.

  • public:
void name ()

Inherited Methods

Inherited From SimpleTestCase

 SimpleTestCase::SimpleTestCase()
 SimpleTestCase::assertExpectation()
 SimpleTestCase::assertFalse()
 SimpleTestCase::assertTrue()
 SimpleTestCase::dump()
 SimpleTestCase::error()
 SimpleTestCase::fail()
 SimpleTestCase::getAssertionLine()
 SimpleTestCase::invoke()
 SimpleTestCase::pass()
 SimpleTestCase::run()
 SimpleTestCase::sendMessage()
 SimpleTestCase::setUp()
 SimpleTestCase::signal()
 SimpleTestCase::swallowErrors()
 SimpleTestCase::tearDown()
 SimpleTestCase::_createRunner()
 SimpleTestCase::_isConstructor()
 SimpleTestCase::_isTest()

Inherited From RunnableTest

 RunnableTest::RunnableTest()
 RunnableTest::getLabel()
 RunnableTest::getSize()
 RunnableTest::run()

Documentation generated on Thu, 20 Jan 2005 17:10:42 +0000 by phpDocumentor 1.3.0RC3