|
From: Marcus B. <ma...@la...> - 2003-09-07 16:07:19
|
Hi. First of all you mail address is blocked by the spam filtering. Do you have a more natural mail address as it is likely I will miss your postings? Regarding the start up process the best bet is to at the tutorial at http://www.lastcraft.com/first_test_tutorial.php as a gentle lead in (I'll be tidying it all up soon). The short answer though is to create two files. all_tests.php... <?php if (!defined('SIMPLE_TEST')) { define('SIMPLE_TEST', 'path_to_simple_test/'); } require_once(SIMPLE_TEST . 'simple_unit.php'); require_once(SIMPLE_TEST . 'simple_html_test.php'); $test = &new GroupTest('All tests'); $test->addTestFile('my_test.php'); $test->attachObserver(new TestHtmlDisplay()); $test->run(); ?> my_test.php... <?php class MyTest extends UnitTestCase { function MyTest() { $this->UnitTestCase(); } } ?> If you point the browser at the all_tests.php it should inform you that zero test cases passed with zero failures. If it doesn't then post your scripts and we'll take it from there. You can now add tests to the new test case. These are just functions that start with the name "test". You can also add more test case classes to the file or add more files to all_tests.php file later on. yours, Marcus. -- Marcus Baker, ma...@la..., no...@ap... |