/** * {@inheritdoc} * * @codeCoverageIgnore */ public function __construct($connection = null, $tablePrefix = null) { $this->_db = \JFactory::getDbo(); $tablePrefix = $this->_db->getPrefix(); $connection = $this->_db->getConnection(); parent::__construct($connection, $tablePrefix); }
/** * Tests the JDatabaseDriver::getConnection method. * * @return void * * @since 11.4 */ public function testGetConnection() { TestReflection::setValue($this->db, 'connection', 'foo'); $this->assertThat( $this->db->getConnection(), $this->equalTo('foo') ); }