\JApplicationCmsTest
Test class for JApplicationCms.
Synopsis
class JApplicationCmsTest
extends TestCaseDatabase
{
- // constants
- const TEST_HTTP_HOST = 'mydomain.com';
- const TEST_USER_AGENT = 'Mozilla/5.0';
- const TEST_REQUEST_URI = '/index.php';
- // members
- protected JApplicationCmsInspector $class;
- // Inherited members from TestCaseDatabase
- protected JDatabaseDriver $driver;
- // methods
- public array getRedirectData()
- public void setUp()
- protected void tearDown()
- protected PHPUnit_Extensions_Database_DataSet_CsvDataSet getDataSet()
- public void test__construct()
- public void test__constructDependancyInjection()
- public void testExecuteWithoutDocument()
- public void testExecuteWithDocument()
- public void testGetCfg()
- public void testGetInstance()
- public void testGetMenu()
- public void testGetPathway()
- public void testGetRouter()
- public void testGetTemplate()
- public void testIsAdmin()
- public void testIsSite()
- public void testRedirect()
- public void testRedirectLegacy()
- public void testRedirectWithHeadersSent()
- public void testRedirectWithJavascriptRedirect()
- public void testRedirectWithMoved()
- public void testRedirectWithUrl()
- public void testRender()
- // 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
Constants
Name | Value |
---|---|
TEST_HTTP_HOST | 'mydomain.com' |
TEST_USER_AGENT | 'Mozilla/5.0' |
TEST_REQUEST_URI | '/index.php' |
Members
protected
- $class
—
JApplicationCmsInspector
An instance of the class to test. - $driver — JDatabaseDriver
Methods
protected
- getDataSet() — Gets the data set to be loaded into the database during setup
- tearDown() — Overrides the parent tearDown method.
public
- getRedirectData() — Data for fetchConfigurationData method.
- setUp() — Setup for testing.
- testExecuteWithDocument() — Tests the JApplicationCms::Execute method with a document.
- testExecuteWithoutDocument() — Tests the JApplicationCms::Execute method without a document.
- testGetCfg() — Tests the JApplicationCms::getCfg method.
- testGetInstance() — Tests the JApplicationCms::getInstance method.
- testGetMenu() — Tests the JApplicationCms::getMenu method.
- testGetPathway() — Tests the JApplicationCms::getPathway method.
- testGetRouter() — Tests the JApplicationCms::getRouter method.
- testGetTemplate() — Tests the JApplicationCms::getTemplate method.
- testIsAdmin() — Tests the JApplicationCms::isAdmin method.
- testIsSite() — Tests the JApplicationCms::isSite method.
- testRedirect() — Tests the JApplicationCms::redirect method.
- testRedirectLegacy() — Tests the JApplicationCms::redirect method.
- testRedirectWithHeadersSent() — Tests the JApplicationCms::redirect method with headers already sent.
- testRedirectWithJavascriptRedirect() — Tests the JApplicationCms::redirect method with headers already sent.
- testRedirectWithMoved() — Tests the JApplicationCms::redirect method with moved option.
- testRedirectWithUrl() — Tests the JApplicationCms::redirect method with assorted URL's.
- testRender() — Tests the JApplicationCms::render method.
- test__construct() — Tests the JApplicationCms::__construct method.
- test__constructDependancyInjection() — Tests the JApplicationCms::__construct method with dependancy injection.
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.