Hi, why are you doing a exit in startCase()?
Here is what is working for me: Fixture:http://bin.cakephp.org/view/668627849 Model: http://bin.cakephp.org/view/1961474698 HTH On Jun 3, 4:55 pm, the_woodsman <[EMAIL PROTECTED]> wrote: > Killerboy! > > Thanks for your input, you really got my hopes up.... but no joy :( > > In fact, neither of the startCase or startTest methods seem to fire: > > http://bin.cakephp.org/view/1864329468 > > Maybe I'm doing something even more obvious wrong too.... > > Again, all suggestions welcome! > > On Jun 3, 12:41 pm, killerboy <[EMAIL PROTECTED]> wrote: > > > Hi, > > > this was an error I had too...the solution is very easy: > > > Just don't use the seUp() Method to create your model object. Use the > > startCase() function and everything will work fine. After I changed > > this, everything worked for me. > > > On Jun 3, 11:46 am, the_woodsman <[EMAIL PROTECTED]> wrote: > > > > Hi Bakers, > > > > I'm trying to import an existing table. I found a few posts relating > > > to this, but none with the same problem. > > > > Basically, I want the test script to create a table, run the tests > > > against it and its fixtures, then destroy the table. > > > I've managed to get this behaviour when I wasn't importing an existing > > > model, but now I'm stuck. > > > > Ideally this should be in the normal DB with a "test_suite" table > > > prefix (as is the behaviour when not importing from an existing > > > model), although in another DB is okay, as long as it runs the CREATE > > > TABLE and DROP TABLE statements for me. > > > > What I have: > > > > //user_confirmation_test_fixture.php > > > <?php > > > class UserConfirmationTestFixture extends CakeTestFixture { > > > var $name = 'UserConfirmationTest'; > > > var $import = 'User';} > > > > ?> > > > //the actual test case > > > <?php > > > > App::import('Model', 'User'); > > > > class UserTest extends User > > > { > > > var $useDbConfig = 'test_suite'; > > > > //tried a few variations here! > > > //var $name = 'UserTest'; > > > //var $useTable='users'; > > > //var $useDbConfig = 'default'; > > > //var $tablePrefix = ''; > > > > } > > > > class UserTestCase extends CakeTestCase > > > { > > > var $TestUser = null; > > > var $fixtures = array( 'user_confirmation_test' ); > > > > function setUp() { > > > $this->TestUser = new UserTest(); > > > } > > > > function tearDown() { > > > unset($this->TestUser); > > > } > > > > function testConfirmEmail() > > > { > > > // some stuff > > > } > > > > } > > > > ?> > > > > My usual error is: > > > > Query: DESCRIBE `test_suite_` > > > > Query: DESCRIBE `test_suite_` > > > > Error: Database table test_suite_users for model User was not found. > > > > But I want the table creation taken care of by the test suite!! > > > > Any ideas? Maybe it's just a typo or naming convention or some such... > > > any help appreciated! > > > > Wood --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
