/** * Callback for the dbo setQuery method. * * @param string $query The query. * * @return void * * @since 11.3 */ public function mockSetQuery($query) { self::$lastQuery = $query; }
/** * Gets a mock database object. * * @return object * * @since 11.3 */ protected function getMockDatabase() { require_once JPATH_TESTS . '/suite/joomla/database/JDatabaseMock.php'; return JDatabaseGlobalMock::create($this); }
/** * Gets a mock database object. * * @return JDatabase * * @since 11.3 */ public function getMockDatabase() { // Load the real class first otherwise the mock will be used if jimport is called again. require_once JPATH_PLATFORM . '/joomla/database/database.php'; // Load the mock class builder. require_once JPATH_TESTS . '/includes/mocks/JDatabaseMock.php'; return JDatabaseGlobalMock::create($this); }
/** * Gets a mock database object. * * @return object * * @since 11.3 */ protected function getMockDatabase() { // Load the real class first otherwise the mock will be used if jimport is called again. require_once JPATH_PLATFORM . '/joomla/database/database.php'; require_once JPATH_TESTS . '/suite/joomla/database/JDatabaseMock.php'; return JDatabaseGlobalMock::create($this); }