\JTableTest
Test class for JTable.
Synopsis
class JTableTest
extends TestCaseDatabase
{
- // members
- protected JTable $object;
- // Inherited members from TestCaseDatabase
- protected JDatabaseDriver $driver;
- // methods
- protected void setUp()
- protected void tearDown()
- public void testGetFields()
- public void testGetInstance()
- public void testAddIncludePath()
- public void testGetTableName()
- public void testGetKeyName()
- public void testGetKeyNameComposite()
- public void testGetDbo()
- public void testSetDBO()
- public void testSetRules()
- public void testGetRules()
- public void testReset()
- public void testBind()
- protected PHPUnit_Extensions_Database_DataSet_CsvDataSet getDataSet()
- public void testLoad()
- public void testCheck()
- public void testStoreInsert()
- public void testStoreUpdate()
- public void testSave()
- public void testDelete()
- public void testDeleteKeysProvided()
- public void testCheckOut()
- public void testCheckIn()
- public void testHasPrimaryKeyNoAutoincrementTrue()
- public void testHasPrimaryKeyNoAutoincrementFalse()
- public void testHasPrimaryKeyAutoincrementTrue()
- public void testHasPrimaryKeyAutoincrementFalse()
- public void testHit()
- public void testIsCheckedOutFalse()
- public void testIsCheckedOutTrue()
- public void testGetNextOrder()
- public void testReorder()
- public void testMove()
- public void testPublish()
- // Inherited methods from TestCaseDatabase
- public static bool errorCallback()
- public static void setUpBeforeClass()
- public static void tearDownAfterClass()
- public void assignMockCallbacks()
- public void assignMockReturns()
- 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()
- protected PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection getConnection()
- protected PHPUnit_Extensions_Database_DataSet_XmlDataSet getDataSet()
- protected PHPUnit_Extensions_Database_Operation_DatabaseOperation getSetUpOperation()
- protected PHPUnit_Extensions_Database_Operation_DatabaseOperation getTearDownOperation()
- protected void restoreFactoryState()
- protected void saveErrorHandlers()
- protected void saveFactoryState()
- protected void setErrorHandlers()
- protected void setErrorCallback()
- protected void setUp()
Hierarchy
Extends
Tasks
Tasks
Line | Task |
---|---|
289+ | Implement testSetRules(). |
302+ | Implement testGetRules(). |
Members
protected
- $driver — JDatabaseDriver
- $object — JTable
Methods
protected
- getDataSet() — Gets the data set to be loaded into the database during setup
- setUp() — Sets up the fixture, for example, opens a network connection.
- tearDown() — Tears down the fixture, for example, closes a network connection.
public
- testAddIncludePath() — Tests the JTable addIncludePath method.
- testBind() — Test for bind method.
- testCheck() — Tests the check method (for completeness).
- testCheckIn() — Test for checkIn method.
- testCheckOut() — Test for checkOut method.
- testDelete() — Test for delete method with no primary key specified.
- testDeleteKeysProvided() — Test for delete method with keys provided.
- testGetDbo() — Test for getDbo.
- testGetFields() — Test for getFields method.
- testGetInstance() — Test for getInstance method.
- testGetKeyName() — Test for getKeyName
- testGetKeyNameComposite() — Test for getKeyName returning an array
- testGetNextOrder() — Test the getNextOrder method.
- testGetRules() — Test for getRules method.
- testGetTableName() — Test for getTableName
- testHasPrimaryKeyAutoincrementFalse() — Test for hasPrimaryKey method with table that has auto increment and the result is false.
- testHasPrimaryKeyAutoincrementTrue() — Test for hasPrimaryKey method with table that has auto increment and the result is true.
- testHasPrimaryKeyNoAutoincrementFalse() — Test for hasPrimaryKey method with table that has no auto increment and the result is false.
- testHasPrimaryKeyNoAutoincrementTrue() — Test for hasPrimaryKey method with table that has no auto increment and the result is true.
- testHit() — Test for hit method - should always return true if there is no hits column.
- testIsCheckedOutFalse() — Test the isCheckedOut method when it is not checked out.
- testIsCheckedOutTrue() — Test the isCheckedOut method when it is checked out.
- testLoad() — Test for load method.
- testMove() — Test the move method.
- testPublish() — Test the publish method.
- testReorder() — Test the reorder method.
- testReset() — Test for reset method.
- testSave() — Tests the save method
- testSetDBO() — Test for setDbo method.
- testSetRules() — Test for setRules method.
- testStoreInsert() — Tests the store method.
- testStoreUpdate() — Tests the store method.
Inherited from TestCaseDatabase
protected
- getConnection() — Returns the default database connection for running the tests.
- getDataSet() — Gets the data set to be loaded into the database during setup
- getSetUpOperation() — Returns the database operation executed in test setup.
- getTearDownOperation() — Returns the database operation executed in test cleanup.
- 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() — Sets up the fixture.
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.
- 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.
- setUpBeforeClass() — This method is called before the first test of this test class is run.
- tearDownAfterClass() — This method is called after the last test of this test class is run.