Description
Test is the abstract interface class for all LZUnit tests.
It accumulates the results of the test and defines the various
assert methods that can be used to implement each test.
TestCase and
TestResult extend this class to provide
functionality.
Details
Methods (16)
-
assertEquals()
-
<method name="assertEquals" args="expected, actual, message" />
public function assertEquals(expected, actual, message);
Assert that an actual value equals (==) an expected value.
-
assertFalse()
-
<method name="assertFalse" args="condition, assertion" />
public function assertFalse(condition, assertion);
Assert that a condition is false.
Note that this tests that condition, if supplied as the argument
to an if statement, would cause the else clause to be chosen.
This does not test that condition == false, or that condition
=== false, use assertEquals or assertSame to make such tests.
-
assertNotNull()
-
<method name="assertNotNull" args="object, message" />
public function assertNotNull(object, message);
Assert that a value is not (!==) null.
-
assertNotSame()
-
<method name="assertNotSame" args="expected, actual, message" />
public function assertNotSame(expected, actual, message);
Assert that an actual value is not the same as (!==) an expected
value.
-
assertNotUndefined()
-
<method name="assertNotUndefined" args="object, message" />
public function assertNotUndefined(object, message);
Assert that a value is not undefined.
-
assertNull()
-
<method name="assertNull" args="object, message" />
public function assertNull(object, message);
Assert that a value is (===) null.
-
assertSame()
-
<method name="assertSame" args="expected, actual, message" />
public function assertSame(expected, actual, message);
Assert that an actual value is the same as (===) an expected
value.
-
assertTrue()
-
<method name="assertTrue" args="condition, assertion" />
public function assertTrue(condition, assertion);
Assert that a condition is true.
Note that this tests that condition, if supplied as the argument
to an if statement, would cause the then clause to be chosen.
This does not test that condition == true, or that condition
=== true, use assertEquals or assertSame to make such tests.
-
assertUndefined()
-
<method name="assertUndefined" args="object, message" />
public function assertUndefined(object, message);
Assert that a value is undefined.
-
assertWithin()
-
<method name="assertWithin" args="expected, actual, delta, message" />
public function assertWithin(expected, actual, delta, message);
Assert that an actual value is within delta of an expected value.
-
construct()
-
<method name="construct" args="parent, args" />
public function construct(parent, args);
-
_dbg_name()
-
<method name="_dbg_name" />
public function _dbg_name();
-
_dbg_typename()
-
<method name="_dbg_typename" />
public function _dbg_typename();
-
debugFields()
-
<method name="debugFields" />
public function debugFields();
-
error()
-
<method name="error" args="message" />
public function error(message);
-
fail()
-
<method name="fail" args="message" />
public function fail(message);
LZX Synopsis
<class name="
Test" extends="
DebugObject
">
<method name="
assertEquals
" args="
expected,
actual,
message" />
<method name="
assertFalse
" args="
condition,
assertion" />
<method name="
assertNotSame
" args="
expected,
actual,
message" />
<method name="
assertNull
" args="
object,
message" />
<method name="
assertSame
" args="
expected,
actual,
message" />
<method name="
assertTrue
" args="
condition,
assertion" />
<method name="
assertWithin
" args="
expected,
actual,
delta,
message" />
<method name="
construct
" args="
parent,
args" />
<method name="
error
" args="
message" />
<method name="
fail
" args="
message" />
</class>
JavaScript Synopsis
public
Test extends
DebugObject
{
prototype public function
assertEquals
(
expected,
actual,
message);
prototype public function
assertFalse
(
condition,
assertion);
prototype public function
assertNotSame
(
expected,
actual,
message);
prototype public function
assertNull
(
object,
message);
prototype public function
assertSame
(
expected,
actual,
message);
prototype public function
assertTrue
(
condition,
assertion);
prototype public function
assertWithin
(
expected,
actual,
delta,
message);
prototype public function
construct
(
parent,
args);
prototype public function
error
(
message);
prototype public function
fail
(
message);
}