Hey Diona:
try if you can replace:
> require_once LIBS.'model'.DS.'model.php';
> require_once CAKE.'app_model.php';
> require_once APP.'models'.DS.'tank.php';
with:
loadModel('Tank');
I think that could save you some work ; ).
-- Felix
--------------------------
http://www.thinkingphp.org
http://www.fg-webdesign.de
Diona K wrote:
> Ah, I got the test to work by using the following:
>
> if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
> define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
> }
> require_once LIBS.'model'.DS.'model.php';
> require_once CAKE.'app_model.php';
> require_once APP.'models'.DS.'tank.php';
>
> /**
> * Short description for class.
> *
> * @package cake.tests
> * @subpackage cake.tests.cases.libs.model
> */
> class TankTest extends UnitTestCase {
>
> function setUp() {
> $this->test =& new Tank();
> }
>
> function testIdentity() {
> $result = $this->test->name;
> $expected = 'Tank';
> $this->assertEqual($result, $expected);
> }
> }
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---