I am sure the docs do not contain the recent changes yet.

My Model-tests work with fixtures. Here is a mini-example. Maybe you
can see some detail that you have done differently.

in phone.test.php

App::import('Model', 'Phone');

class PhoneTest extends Phone {
    var $name = 'PhoneTest';
    var $useDbConfig = 'test_suite';
}

class PhoneTestCase extends CakeTestCase {
    var $fixtures = array( 'app.phone_test' );

    function testStorage() {
        $this->PhoneTest =& new PhoneTest();

        $all = $this->PhoneTest->findAll();

        $this->assertEqual(4, count($all));
    }
}


ideas:
I have changed useDbConfig = test to test_suite
I have added app. to my fixtures for identification.
Your should maybe use the callbacks startCase(), endCase(),
startTest(), endTest() to make a shared connection to the database.

hope it helps
/Martin


On Oct 7, 11:56 am, "Christof Damian" <[EMAIL PROTECTED]> wrote:
> Now that I fixed the connection problems with fixtures I have another
> problem. All my tests which uses fixtures show this error:
>
>   Unexpected PHP error [Trying to get property of non-object] severity
> [E_NOTICE] in [.../cake/libs/class_registry.php line 295]
>   .../tests/cases/models/product.test.php -> ProductTestCase -> start
>
> This is triggered by the start method, which looks like this:
>
>    function start() {
>       parent::start();
>       $this->Product = new TestProductModel ();
>    }
>
> Has the way to do this changed? I am still doing it as the documentation 
> shows.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to