Thursday, September 3, 2009

Re: Simpletest Model Test Cases with HABTM Relationsships delete Tables from Test Database

... and added a fixture for the HABTM relationship between messages
and tags:

<?php

class MessagesTagFixture extends CakeTestFixture {
var $name = 'MessagesTag';
var $table = 'messages_tags';
var $fields = array(
'message_id' => array('type'=>'integer', 'null' => false, 'length'
=> 10),
'tag_id' => array('type'=>'integer', 'null' => false, 'length' =>
10)
);
var $records = array(array(
'message_id' => 1,
'tag_id' => 1
));
}

?>

Marco
--~--~---------~--~----~------------~-------~--~----~
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 cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: