Constructor. Sets the test name.
PHPUnit_TestCase
__construct
([$label $label = false])
-
$label
$label: Test name to display.
Redefinition of:
- SimpleTestCase::__construct()
- Sets up the test with no display.
Will test straight equality if set to loose typing, or identity if not.
void
assertEquals
($first $first, $second $second, [$message $message = "%s"], [ $delta = 0])
-
$first
$first: First value.
-
$second
$second: Comparison value.
-
$message
$message: Message to display.
-
$delta
Sends pass if the test condition resolves false, a fail otherwise.
void
assertFalse
($condition $condition, [$message $message = "%s"])
-
$condition
$condition: Condition to test false.
-
$message
$message: Message to display.
Passes if the value tested is not null.
void
assertNotNull
($value $value, [$message $message = "%s"])
-
$value
$value: Value to test against.
-
$message
$message: Message to display.
Inverted identity test.
void
assertNotSame
($first $first, $second $second, [$message $message = "%s"])
-
$first
$first: First object handle.
-
$second
$second: Hopefully a different handle.
-
$message
$message: Message to display.
Passes if the value tested is null.
void
assertNull
($value $value, [$message $message = "%s"])
-
$value
$value: Value to test against.
-
$message
$message: Message to display.
Tests a regex match. Needs refactoring.
void
assertRegExp
($pattern $pattern, $subject $subject, [$message $message = "%s"])
-
$pattern
$pattern: Regex to match.
-
$subject
$subject: String to search in.
-
$message
$message: Message to display.
Identity test tests for the same object.
void
assertSame
($first $first, $second $second, [$message $message = "%s"])
-
$first
$first: First object handle.
-
$second
$second: Hopefully the same handle.
-
$message
$message: Message to display.
Sends pass if the test condition resolves true, a fail otherwise.
void
assertTrue
($condition $condition, [$message $message = "%s"])
-
$condition
$condition: Condition to test true.
-
$message
$message: Message to display.
Tests the type of a value.
void
assertType
($value $value, $type $type, [$message $message = "%s"])
-
$value
$value: Value to take type of.
-
$type
$type: Hoped for type.
-
$message
$message: Message to display.
For progress indication during a test amongst other things.
Usually
countTestCases
()
Accessor for name, normally just the class name.
void
getName
()
Sets equality operation to act as a simple equal comparison only, allowing a broader range of matches.
void
setLooselyTyped
($loosely_typed $loosely_typed)
-
$loosely_typed
$loosely_typed: True for broader comparison.
Does nothing. For compatibility only.
void
setName
($name $name)
Inherited Methods
Inherited From SimpleTestCase
SimpleTestCase::__construct()
SimpleTestCase::after()
SimpleTestCase::assert()
SimpleTestCase::before()
SimpleTestCase::createInvoker()
SimpleTestCase::dump()
SimpleTestCase::error()
SimpleTestCase::exception()
SimpleTestCase::fail()
SimpleTestCase::getAssertionLine()
SimpleTestCase::getLabel()
SimpleTestCase::getSize()
SimpleTestCase::getTests()
SimpleTestCase::isTest()
SimpleTestCase::pass()
SimpleTestCase::run()
SimpleTestCase::setUp()
SimpleTestCase::shouldSkip()
SimpleTestCase::signal()
SimpleTestCase::skip()
SimpleTestCase::skipIf()
SimpleTestCase::skipUnless()
SimpleTestCase::tearDown()
SimpleTestCase::tell()