Perform api test.
Checks an attribute for general characteristics, like valid return types for often overriden methods, the ability to check, add, remove flags, compatibility of value2db with db2value, and canonical reactions to methods like isEmpty when called with empty records.
Parameters:
|
atkAttribute |
$attribute: |
Instance of the attribute to check. |
|
|
&$attribute: |
|
void assertBoolean(
mixed
$value, [String
$msg = ""]
)
|
|
Assert if a value is a boolean (true or false).
Parameters:
|
mixed |
$value: |
Value to check |
|
String |
$msg: |
Message to display for test |
void assertDbFieldSize(
mixed
$value, [String
$msg = ""]
)
|
|
Assert if a value matches the dbFieldSize() output, which can be int or 'x,x'
Parameters:
|
mixed |
$value: |
Value to check |
|
String |
$msg: |
Message to display for test |
void assertInteger(
mixed
$value, [String
$msg = ""]
)
|
|
Assert if a value is an integer.
Parameters:
|
mixed |
$value: |
Value to check |
|
String |
$msg: |
Message to display for test |
void assertNumeric(
mixed
$value, [String
$msg = ""]
)
|
|
Assert if a value is numeric (checks only the actual value, not its type).
Parameters:
|
mixed |
$value: |
Value to check |
|
String |
$msg: |
Message to display for test |
Return the testvalue of the attribute.
API Tags:
| Return: | returns the testvalue which will be used by the testcases for inserting data in the database. |
void _getMsg(
[String
$msg = ""]
)
|
|
Get canonical test message (attribute classname + custom message + %s.
Parameters:
|
String |
$msg: |
Message to display for test |
API Tags:
void _testDbConversion(
)
|
|
Check if value2db and db2value are eachothers full opposite.
API Tags:
Test addFlag, removeFlag and hasFlag.
API Tags:
Check if isEmpty returns true for empty records.
API Tags:
Redefined in descendants as:
void _testReturnValues(
)
|
|
Check return types for methods where the system is dependent on a proper use of the returned value.
API Tags: