\JDatabaseQueryPostgresqlTest
Test class for JDatabaseQueryPostgresql.
Synopsis
class JDatabaseQueryPostgresqlTest
extends TestCase
{
- // members
- protected JDatabaseDriver $dbo;
- private JDatabaseQueryPostgresql $_instance;
- // Inherited members from TestCase
- protected $expectedErrors;
- // methods
- public array dataTestNullDate()
- public array dataTestQuote()
- public array dataTestJoin()
- public string mockEscape()
- public string mockQuoteName()
- protected void setUp()
- public void test__toStringSelect()
- public void test__toStringUpdate()
- public void test__toStringYear()
- public void test__toStringMonth()
- public void test__toStringDay()
- public void test__toStringHour()
- public void test__toStringMinute()
- public void test__toStringSecond()
- public void test__toStringInsert_subquery()
- public void testCastAsChar()
- public void testCharLength()
- public void testChaining()
- public void testClear_all()
- public void testClear_clause()
- public void testClear_type()
- public void testConcatenate()
- public void testFrom()
- public void testGroup()
- public void testHaving()
- public void testInnerJoin()
- public void testJoin()
- public void testLeftJoin()
- public void testNullDate()
- public void testOrder()
- public void testOuterJoin()
- public void testQuote()
- public void testQuoteName()
- public void testRightJoin()
- public void testSelect()
- public void testWhere()
- public void testEscape()
- public void testForUpdate()
- public void testForShare()
- public void testNoWait()
- public void testLimit()
- public void testOffset()
- public void testReturning()
- public array seedDateAdd()
- public void testDateAdd()
- // Inherited methods from TestCase
- public static boolean errorCallback()
- public void assignMockCallbacks()
- public void assignMockReturns()
- public JException expectedErrorCallback()
- public JApplication getMockApplication()
- public JApplicationCms getMockCmsApp()
- public JConfig getMockConfig()
- public JDatabase getMockDatabase()
- public JEventDispatcher getMockDispatcher()
- public JDocument getMockDocument()
- public JLanguage getMockLanguage()
- public JSession getMockSession()
- public JApplicationWeb getMockWeb()
- public void setExpectedError()
- protected void restoreErrorHandlers()
- protected void restoreFactoryState()
- protected void saveErrorHandlers()
- protected void saveFactoryState()
- protected void setErrorHandlers()
- protected void setErrorCallback()
- protected void setUp()
- protected void tearDown()
Hierarchy
Extends
Members
private
- $_instance
—
JDatabaseQueryPostgresql
The instance of the object to test.
protected
- $dbo — JDatabaseDriver
- $expectedErrors — array
Methods
protected
- setUp() — Sets up the fixture, for example, opens a network connection.
public
- dataTestJoin() — Data for the testJoin test.
- dataTestNullDate() — Data for the testNullDate test.
- dataTestQuote() — Data for the testNullDate test.
- mockEscape() — A mock callback for the database escape method.
- mockQuoteName() — A mock callback for the database quoteName method.
- seedDateAdd() — Data for the testDateAdd test.
- testCastAsChar() — Test for the castAsChar method.
- testChaining() — Test chaining.
- testCharLength() — Test for the charLength method.
- testClear_all() — Test for the clear method (clearing all types and clauses).
- testClear_clause() — Test for the clear method (clearing each clause).
- testClear_type() — Test for the clear method (clearing each query type).
- testConcatenate() — Test for "concatenate" words.
- testDateAdd() — Tests the JDatabasePostgresqlQuery::DateAdd method
- testEscape() — Tests the JDatabaseQueryPostgresql::escape method.
- testForUpdate() — Test for FOR UPDATE clause.
- testFrom() — Test for FROM clause.
- testGroup() — Test for GROUP clause.
- testHaving() — Test for HAVING clause using a simple condition and with glue for second one.
- testInnerJoin() — Test for INNER JOIN clause.
- testJoin() — Test for JOIN clause using dataprovider to test all types of join.
- testLeftJoin() — Test for LEFT JOIN clause.
- testLimit() — Test for LIMIT clause.
- testNoWait() — Test for NOWAIT clause.
- testNullDate() — Tests the quoteName method.
- testOffset() — Test for OFFSET clause.
- testOrder() — Test for ORDER clause.
- testOuterJoin() — Test for OUTER JOIN clause.
- testQuote() — Tests the quoteName method.
- testQuoteName() — Tests the quoteName method.
- testReturning() — Test for RETURNING clause.
- testRightJoin() — Test for RIGHT JOIN clause.
- testSelect() — Test for SELECT clause.
- testWhere() — Test for WHERE clause using a simple condition and with glue for second one.
- test__toStringDay() — Test for day extraction from date.
- test__toStringHour() — Test for hour extraction from date.
- test__toStringInsert_subquery() — Test for INSERT INTO clause with subquery.
- test__toStringMinute() — Test for minute extraction from date.
- test__toStringMonth() — Test for month extraction from date.
- test__toStringSecond() — Test for seconds extraction from date.
- test__toStringSelect() — Test for the JDatabaseQueryPostgresql::__string method for a 'select' case.
- test__toStringUpdate() — Test for the JDatabaseQuery::__string method for a 'update' case.
- test__toStringYear() — Test for year extraction from date.
Inherited from TestCase
protected
- restoreErrorHandlers() — Sets the JError error handlers.
- restoreFactoryState() — Sets the Factory pointers
- saveErrorHandlers() — Saves the current state of the JError error handlers.
- saveFactoryState() — Saves the Factory pointers
- setErrorCallback() — Sets the JError error handlers to callback mode and points them at the test logging method.
- setErrorHandlers() — Sets the JError error handlers.
- setUp() — Overrides the parent setup method.
- tearDown() — Overrides the parent tearDown method.
public
- assignMockCallbacks() — Assigns mock callbacks to methods.
- assignMockReturns() — Assigns mock values to methods.
- errorCallback() — Receives the callback from JError and logs the required error information for the test.
- expectedErrorCallback() — Callback receives the error from JError and deals with it appropriately If a test expects a JError to be raised, it should call this setExpectedError first If you don't call this method first, the test will fail.
- getMockApplication() — Gets a mock application object.
- getMockCmsApp() — Gets a mock CMS application object.
- getMockConfig() — Gets a mock configuration object.
- getMockDatabase() — Gets a mock database object.
- getMockDispatcher() — Gets a mock dispatcher object.
- getMockDocument() — Gets a mock document object.
- getMockLanguage() — Gets a mock language object.
- getMockSession() — Gets a mock session object.
- getMockWeb() — Gets a mock web object.
- setExpectedError() — Tells the unit tests that a method or action you are about to attempt is expected to result in JError::raiseSomething being called.