コード例 #1
0
ファイル: Joomla.php プロジェクト: jbzoo/sqlbuilder
 /**
  * {@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);
 }
コード例 #2
0
	/**
	 * 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')
		);
	}