\JAccessTest
Test class for JAccess.
Synopsis
class JAccessTest
extends TestCaseDatabase
{
- // members
- protected JAccess $object;
- // Inherited members from TestCaseDatabase
- protected JDatabaseDriver $driver;
- // methods
- public void testGetAuthorisedViewLevels()
- public array casesCheck()
- public void testCheck()
- public array casesCheckGroup()
- public void testCheckGroup()
- public void testGetAssetRulesValidTrue()
- public void testGetAssetRulesValidFalse()
- public void testGetAssetRulesInvalidFalse()
- public void testGetAssetRulesTextFalse()
- public void testGetAssetRulesTextTrue()
- public void testGetUsersByGroupSimple()
- public void testGetUsersByGroupTwoUsers()
- public void testGetUsersByGroupInvalidGroup()
- public void testGetGroupsByUser()
- public array casesGetActionsFromData()
- public void testGetActionsFromData()
- public void testGetActionsFromFile()
- protected PHPUnit_Extensions_Database_DataSet_CsvDataSet getDataSet()
- protected void setUp()
- protected void tearDown()
- private void _cleanupTestFiles()
- private void _cleanupFile()
- // 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
Members
protected
- $driver — JDatabaseDriver
- $object — JAccess
Methods
private
- _cleanupFile() — Convenience method to clean up for files test
- _cleanupTestFiles() — Convenience method to cleanup before and after test
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() — Remove created files
public
- casesCheck() — Test cases for testCheck
- casesCheckGroup() — Test cases for testCheckGroups
- casesGetActionsFromData() — Data provider for the JAccess::getActionsFromData method.
- testCheck() — Tests the JAccess::check method.
- testCheckGroup() — Tests the JAccess::checkGroup method.
- testGetActionsFromData() — Tests the JAccess::getActionsFromData method.
- testGetActionsFromFile() — Tests the JAccess::getActionsFromFile method.
- testGetAssetRulesInvalidFalse() — Tests the JAccess::getAssetRules method.
- testGetAssetRulesTextFalse() — Tests the JAccess::getAssetRules method.
- testGetAssetRulesTextTrue() — Tests the JAccess::getAssetRules method.
- testGetAssetRulesValidFalse() — Tests the JAccess::getAssetRules method.
- testGetAssetRulesValidTrue() — Tests the JAccess::getAssetRules method.
- testGetAuthorisedViewLevels() — Tests the JAccess::getAuthorisedViewLevels method.
- testGetGroupsByUser() — Tests the JAccess::getGroupsByUser method.
- testGetUsersByGroupInvalidGroup() — Tests the JAccess::getUsersByGroup method.
- testGetUsersByGroupSimple() — Tests the JAccess::getUsersByGroup method.
- testGetUsersByGroupTwoUsers() — Tests the JAccess::getUsersByGroup 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.