Commits / 017a6dc
Louis Landry avatarLouis Landry committed (raw commit)

Fixing up the tests.

Comments (0)

Files changed (7)

libraries/joomla/database/database/mysqlexporter.php

 	protected $cache = array();
 
 	/**
-	 * @var    JDatabaseDriverMySQL  The database connector to use for exporting structure and/or data.
+	 * @var    JDatabaseMySQL  The database connector to use for exporting structure and/or data.
 	 * @since  11.1
 	 */
 	protected $db = null;
 	public function check()
 	{
 		// Check if the db connector has been set.
-		if (!($this->db instanceof JDatabaseDriverMySQL)) {
+		if (!($this->db instanceof JDatabaseMySQL)) {
 			throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE');
 		}
 
 	/**
 	 * Sets the database connector to use for exporting structure and/or data from MySQL.
 	 *
-	 * @param   JDatabaseDriverMySQL  $db  The database connector.
+	 * @param   JDatabaseMySQL  $db  The database connector.
 	 *
 	 * @return  JDatabaseExporterMySQL  Method supports chaining.
 	 * @since   11.1
 	 */
-	public function setDbo(JDatabaseDriverMySQL $db)
+	public function setDbo(JDatabaseMySQL $db)
 	{
 		$this->db = $db;
 

libraries/joomla/database/database/mysqliexporter.php

 	protected $cache = array();
 
 	/**
-	 * @var    JDatabaseDriverMySQLi  The database connector to use for exporting structure and/or data.
+	 * @var    JDatabaseMySQLi  The database connector to use for exporting structure and/or data.
 	 * @since  11.1
 	 */
 	protected $db = null;
 	public function check()
 	{
 		// Check if the db connector has been set.
-		if (!($this->db instanceof JDatabaseDriverMySql)) {
+		if (!($this->db instanceof JDatabaseMySql)) {
 			throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE');
 		}
 
 	 * @return  JDatabaseExporterMySQLi  Method supports chaining.
 	 * @since   11.1
 	 */
-	public function setDbo(JDatabaseDriverMySQLi $db)
+	public function setDbo(JDatabaseMySQLi $db)
 	{
 		$this->db = $db;
 

libraries/joomla/database/database/mysqliimporter.php

 	protected $cache = array();
 
 	/**
-	 * @var    JDatabaseDriverMySQLi  The database connector to use for exporting structure and/or data.
+	 * @var    JDatabaseMySQLi  The database connector to use for exporting structure and/or data.
 	 * @since  11.1
 	 */
 	protected $db = null;
 	public function check()
 	{
 		// Check if the db connector has been set.
-		if (!($this->db instanceof JDatabaseDriverMySql)) {
+		if (!($this->db instanceof JDatabaseMySql)) {
 			throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE');
 		}
 
 	/**
 	 * Sets the database connector to use for exporting structure and/or data from MySQL.
 	 *
-	 * @param   JDatabaseDriverMySQLi  $db  The database connector.
+	 * @param   JDatabaseMySQLi  $db  The database connector.
 	 *
 	 * @return  JDatabaseImporterMySQLi  Method supports chaining.
 	 * @since   11.1
 	 */
-	public function setDbo(JDatabaseDriverMySQLi $db)
+	public function setDbo(JDatabaseMySQLi $db)
 	{
 		$this->db = $db;
 

libraries/joomla/database/database/mysqlimporter.php

 	protected $cache = array();
 
 	/**
-	 * @var    JDatabaseDriverMySQL  The database connector to use for exporting structure and/or data.
+	 * @var    JDatabaseMySQL  The database connector to use for exporting structure and/or data.
 	 * @since  11.1
 	 */
 	protected $db = null;
 	public function check()
 	{
 		// Check if the db connector has been set.
-		if (!($this->db instanceof JDatabaseDriverMySql)) {
+		if (!($this->db instanceof JDatabaseMySql)) {
 			throw new Exception('JPLATFORM_ERROR_DATABASE_CONNECTOR_WRONG_TYPE');
 		}
 
 	/**
 	 * Sets the database connector to use for exporting structure and/or data from MySQL.
 	 *
-	 * @param   JDatabaseDriverMySQL  $db  The database connector.
+	 * @param   JDatabaseMySQL  $db  The database connector.
 	 *
 	 * @return  JDatabaseImporterMySQL  Method supports chaining.
 	 * @since   11.1
 	 */
-	public function setDbo(JDatabaseDriverMySQL $db)
+	public function setDbo(JDatabaseMySQL $db)
 	{
 		$this->db = $db;
 

libraries/joomla/error/error.php

  */
 abstract class JError
 {
+	/**
+	 * @var    bool  True to enable legacy error handling using JError, false to use exception handling.  This flag
+	 *               is present to allow an easy transition into exception handling for code written against the
+	 *               existing JError API in Joomla.
+	 * @since  11.1
+	 */
+	public static $legacy = false;
+
 	protected static $levels = array(
 		E_NOTICE => 'Notice',
 		E_WARNING => 'Warning',
 	protected static $stack = array();
 
 	/**
-	 * Method to determine if a value is an exception object.  This check supports 
+	 * Method to determine if a value is an exception object.  This check supports
 	 * both JException and PHP5 Exception objects
 	 *
 	 * @param	mixed	&$object	Object to check
 	 * Method to add non-JError thrown JExceptions to the JError stack for debugging purposes
 	 *
 	 * @param	object JException
-	 * 
+	 *
 	 * @return	void
 	 * @since	11.1
 	 */
 	 *
 	 * @param	string	$code	The application-internal error code for this error
 	 * @param	string	$msg	The error message, which may also be shown the user if need be.
-	 * @param	mixed	$info	Optional: Additional error information (usually only developer-relevant information that 
+	 * @param	mixed	$info	Optional: Additional error information (usually only developer-relevant information that
 	 * 							the user should never see, like a database DSN).
 	 *
 	 * @return	object	$error	The configured JError object
 	 *
 	 * @param	string	$code	The application-internal error code for this error
 	 * @param	string	$msg	The error message, which may also be shown the user if need be.
-	 * @param	mixed	$info	Optional: Additional error information (usually only developer-relevant information that 
+	 * @param	mixed	$info	Optional: Additional error information (usually only developer-relevant information that
 	 * 							the user should never see, like a database DSN).
 	 *
 	 * @return	object	$error	The configured JError object
 	 *
 	 * @param	string	$code	The application-internal error code for this error
 	 * @param	string	$msg	The error message, which may also be shown the user if need be.
-	 * @param	mixed	$info	Optional: Additional error information (usually only developer-relevant information 
+	 * @param	mixed	$info	Optional: Additional error information (usually only developer-relevant information
 	 * 							that the user should never see, like a database DSN).
 	 *
 	 * @return	object	$error	The configured JError object

tests/suite/joomla/database/database/JDatabaseMySqlExporterInspector.php

  * @package    Joomla.UnitTest
  * @subpackage Database
  */
-class JDatabaseMySqlExporterInspector extends JDatabaseMySqlExporter
+class JDatabaseMySqlExporterInspector extends JDatabaseExporterMySql
 {
 	/**
 	 * Gets any property from the class.

tests/suite/joomla/database/database/JDatabaseMySqlImporterInspector.php

  */
 
 require_once JPATH_PLATFORM.'/joomla/database/database/mysqlimporter.php';
+require_once JPATH_PLATFORM.'/joomla/database/databaseexception.php';
 
 /**
  * Class to expose protected properties and methods in JDatabaseMySqlExporter for testing purposes.
  * @package    Joomla.UnitTest
  * @subpackage Database
  */
-class JDatabaseMySqlImporterInspector extends JDatabaseMySqlImporter
+class JDatabaseMySqlImporterInspector extends JDatabaseImporterMySql
 {
 	/**
 	 * Gets any property from the class.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.