Simpletest in cakephp

2007-04-25 Thread [EMAIL PROTECTED]

How can I get simpletest to work in cakePHP 1.1.14 (not interested in
1.2)? So far I have downloaded the simpletest package into the cake/
vendors folder, and I created a test.php file in app/webroot with the
following code, but it doesn't do anything... Do I need to replace the
require_once lines with vendor() or uses()? Thanks.

?php
if (! defined('SIMPLE_TEST')) {
define('SIMPLE_TEST', 'simpletest/');
}
require_once(SIMPLE_TEST . 'unit_tester.php');
require_once(SIMPLE_TEST . 'reporter.php');

class TestOfLogging extends UnitTestCase {
function TestOfLogging() {
$this-UnitTestCase();
}
function testCreatingNewFile() {
}
}

$test = new TestOfLogging();
$test-run(new HtmlReporter());
?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Simpletest in cakephp

2007-04-25 Thread zwobot

You need to install the test suite, too. You can download it there:
http://cakeforge.org/projects/testsuite/
There is little documentation on the whole testing stuff in cakePHP,
but afaik you just to extract the app folder of the test suite
download into your app folder.
You then have to write test cases/classes, the bakery has an article
about testing models with cake 1.2. You cannot apply that 1:1 to prior
cake versions but it gives you a general hint on how to test stuff
with cakePHP.
Although I'd highly prefered a decent tutorial aobut test suite in
cakePHP.

I have started a discussion about testing with cakePHP 1.1 here:
http://groups.google.com/group/cake-php/browse_thread/thread/50745614e4717266
(anybody feel encouraged to answer to that, please).

The test suite seems to be integrated in cake 1.2 but I cannot use it
right now as the changes to the current stable version are not well
documented (yet).


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---