Class: atkTestSuite
Source Location: /test/class.atktestsuite.inc
Class atkTestSuite
Class Overview
|
The atkTestSuite is a SimpleTest framework wrapper that auto-detects testcases in the entire atk application and atk itself. By running test.php from the ATK skel (place test.php in your application root if it's not there already), you can test both ATK and your own application.
To create a testcase, just create a file named class.test_<classname>.inc where <classname> is the name of the class you want to test. The file should create a valid SimpleTest testcase class.
Located in /test/class.atktestsuite.inc [line 49]
Wiki documentation
Author(s):
Information Tags:
|
Methods
|
Method Summary
| void |
run() |
Detect, and run, all available tests. |
| void |
runTestCases() |
Run/add test-cases to the given group test. Can be overriden to register custom test classes. |
Methods
static boolean useTestDatabase(
)
|
|
Detect if a test-database is used or not.
API Tags:
| Return: | use test-database? |
atkTestSuite atkTestSuite(
)
|
|
Constructor
void getTestCaseLocationForClass(
$class
)
|
|
Parameters:
void getTestClassPath(
$testclass
)
|
|
Parameters:
void run(
[string
$reporttype = "html"], [string
$module = ""]
)
|
|
Detect, and run, all available tests.
Parameters:
|
string |
$reporttype: |
Simpletest report type, can be 'text' or 'html' If you are running it in cli mode, it will select text automaticly |
|
string |
$module: |
Run only tests from a single module. Passing an empty string (default) will run all available tests. passing "atk" will only run atk's own tests. |
void runTestCases(
&$test, [string
$module = ''], GroupTest
$test
)
|
|
Run/add test-cases to the given group test. Can be overriden to register custom test classes.
Parameters:
|
GroupTest |
$test: |
group test |
|
string |
$module: |
ATK module name |
|
|
&$test: |
|
void _runTestCase(
&$test,
$testcase
)
|
|
Parameters:
void _setupTestDatabases(
)
|
|
Setup the test database(s). Clones the database structure of the
default databases to the test databases. All data in the test databases will be lost!