\JApplicationTest
Test class for JApplication.
Synopsis
class JApplicationTest
extends TestCase
{
- // members
- protected JApplication $object;
- // Inherited members from TestCase
- protected $expectedErrors;
- // methods
- protected void setUp()
- protected void tearDown()
- public void testGetInstance()
- public void testInitialise()
- public void testConstruct()
- public void testRoute()
- public void testDispatch()
- public void testRender()
- public void testClose()
- public void testRedirect()
- public void testEnqueueMessage()
- public void testGetMessageQueue()
- public void testGetCfg()
- public void testGetName()
- public void testGetUserState()
- public void testSetUserState()
- public void testGetUserStateFromRequest()
- public void testRegisterEvent()
- public void testTriggerEvent()
- public void testLogin()
- public void testLogout()
- public void testGetTemplate()
- public void testGetRouter()
- public void testStringURLSafe()
- public void testGetPathway()
- public void testGetMenu()
- public void testGetHash()
- public void testCheckSession()
- public void testGetClientId()
- public void testIsAdmin()
- public void testIsSite()
- public void testIsWinOS()
- public void testIsSSLConnection()
- // 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
Tasks
Tasks
Line | Task |
---|---|
57+ | Implement testGetInstance(). |
70+ | Implement testInitialise(). |
103+ | Implement testRoute(). |
116+ | Implement testDispatch(). |
129+ | Implement testRender(). |
142+ | Implement testClose(). |
155+ | Implement testRedirect(). |
168+ | Implement testEnqueueMessage(). |
181+ | Implement testGetMessageQueue(). |
194+ | Implement testGetCfg(). |
207+ | Implement testGetName(). |
220+ | Implement testGetUserState(). |
233+ | Implement testSetUserState(). |
246+ | Implement testGetUserStateFromRequest(). |
259+ | Implement testRegisterEvent(). |
272+ | Implement testTriggerEvent(). |
285+ | Implement testLogin(). |
298+ | Implement testLogout(). |
311+ | Implement testGetTemplate(). |
324+ | Implement testGetRouter(). |
337+ | Implement testStringURLSafe(). |
350+ | Implement testGetPathway(). |
363+ | Implement testGetMenu(). |
396+ | Implement testCheckSession(). |
409+ | Implement testGetClientId(). |
422+ | Implement testIsAdmin(). |
435+ | Implement testIsSite(). |
448+ | Implement testIsWinOS(). |
Members
protected
- $expectedErrors — array
- $object
—
JApplication
Object under test
Methods
protected
- setUp() — Sets up the fixture, for example, opens a network connection.
- tearDown() — Sets up the fixture, for example, opens a network connection.
public
- testCheckSession() — Test JApplication::checkSession
- testClose() — Test JApplication::close
- testConstruct() — Test JApplication::__construct
- testDispatch() — Test JApplication::dispatch
- testEnqueueMessage() — Test JApplication::enqueueMessage
- testGetCfg() — Test JApplication::getCfg
- testGetClientId() — Test JApplication::getClientId
- testGetHash() — Testing JApplication::getHash
- testGetInstance() — Test JApplication::getInstance
- testGetMenu() — Test JApplication::getMenu
- testGetMessageQueue() — Test JApplication::getMessageQueue
- testGetName() — Test JApplication::getName
- testGetPathway() — Test JApplication::getPathway
- testGetRouter() — Test JApplication::getRouter
- testGetTemplate() — Test JApplication::getTemplate
- testGetUserState() — Test JApplication::getUserState
- testGetUserStateFromRequest() — Test JApplication::getUserStateFromRequest
- testInitialise() — Test JApplication::initialise
- testIsAdmin() — Test JApplication::isAdmin
- testIsSSLConnection() — Test JApplication::isSSLConnection
- testIsSite() — Test JApplication::isSite
- testIsWinOS() — Test JApplication::isWinOs
- testLogin() — Test JApplication::login
- testLogout() — Test JApplication::logout
- testRedirect() — Test JApplication::redirect
- testRegisterEvent() — Test JApplication::registerEvent
- testRender() — Test JApplication::render
- testRoute() — Test JApplication::route
- testSetUserState() — Test JApplication::setUserState
- testStringURLSafe() — Test JApplication::stringUrlSafe
- testTriggerEvent() — Test JApplication::triggerEvent
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.