public function setUp() { $this->db = new MockDatabase(); $this->_configs = Connections::config(); Connections::reset(); Connections::config(array('mock-database-connection' => array('object' => &$this->db, 'adapter' => 'MockDatabase'))); MockDatabasePost::config(); MockDatabaseComment::config(); }
public function setUp() { MockDatabasePost::config(); MockDatabaseComment::config(); MockDatabaseTagging::config(); MockDatabasePostRevision::config(); $this->db = new MockDatabase(); MockDatabasePost::$connection = $this->db; MockDatabaseComment::$connection = $this->db; MockDatabaseTagging::$connection = $this->db; MockDatabasePostRevision::$connection = $this->db; }
public function setUp() { $this->_db = new MockDatabase(); Connections::add('mockconn', array('object' => $this->_db)); $config = array('meta' => array('connection' => 'mockconn')); MockDatabasePost::config($config); MockDatabaseComment::config($config); MockDatabaseTagging::config($config); MockDatabasePostRevision::config($config); MockGallery::config($config); MockImage::config($config); MockImageTag::config($config); MockTag::config($config); }