/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->db = static::$dbo; $this->object = new RelationDataMapper('cont', 'ww_content'); $this->object->addTable('cat', 'ww_categories', 'cont.catid = cat.id', 'LEFT')->addTable('user', 'ww_users', 'cont.created_by = user.id', 'LEFT'); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->db = static::$dbo; $this->object = new OtoDataMapper('ww_content'); $this->object->addRelation('b', new DataMapper('ww_content2'), array('id' => 'content_id')); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->db = static::$dbo; $this->object = new DataMapper('ww_content'); }