#6528: Problem when test from several databases --------------------------------------+------------------------------------- Reporter: lucky | Owner: Type: Bug | Status: reopened Priority: High | Milestone: 1.2.x.x Component: Model | Version: 1.2 Final Severity: Normal | Resolution: Keywords: model, test, testcase | Php_version: PHP 5 Cake_version: 8225 | --------------------------------------+------------------------------------- Comment (by lucky):
You an reproduce the error with several different database and several model with association. Exemple: <?php class City extends AppModel { var $useTable = 'cities'; var $useDbConfig = 'datacity'; var $actsAs = array( "Containable" ); var $hasMany = array( "Clip" ); } ?> <?php class Clip extends AppModel { var $useTable = 'clips'; var $useDbConfig = 'dataclip'; var $belongsTo = array("City" ); var $actsAs = array( "Containable" ); } ?> <?php class CityFixture extends CakeTestFixture { var $name = 'city'; var $import = array('model' => 'City','connection' =>'datacity'); function __construct() { parent::__construct(); $this->records = // personal record } } ?> <?php class ClipFixture extends CakeTestFixture { var $name = 'clip'; var $import = array('model' => 'Clip','connection' => 'prod'); function __construct() { parent::__construct(); $this->records = //personal record } } ?> <?php App::import('Model','Clip'); class ClipTestCase extends CakeTestCase { var $fixtures = array( 'app.clip','app.city' ); } ?> <?php App::import('Model','City'); class CityTestCase extends CakeTestCase { var $fixtures = array( 'app.clip','app.city'); } ?> -- Ticket URL: <https://trac.cakephp.org/ticket/6528#comment:3> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---