\JHtmlTest
Tests for the JHtml class.
Synopsis
class JHtmlTest
extends TestCase
{
- // Inherited members from TestCase
- protected $expectedErrors;
- // methods
- protected void setUp()
- protected void tearDown()
- public void test_()
- public void test_WithMissingClass()
- public void test_WithMissingFile()
- public void test_WithMissingMethod()
- public void testRegister()
- public void testUnregister()
- public void testIsRegistered()
- public array dataTestLink()
- public void testLink()
- public void testImage()
- public array dataTestIFrame()
- public void testIframe()
- public void testScript()
- public void testSetFormatOptions()
- public void testStylesheet()
- public void testDate()
- public void testTooltip()
- public void testCalendar()
- public void testAddIncludePath()
- public void testTooltipText()
- // 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 |
---|---|
596 | We need to mock this. |
942+ | Implement testSetFormatOptions(). |
982 | We need to mock this. |
1349+ | Implement testDate(). |
1499 | - Test currently failing, fix this later |
1543 | We can't test this yet due to dependency on language strings |
1659+ | Implement testAddIncludePath(). |
Members
protected
- $expectedErrors — array
Methods
protected
- setUp() — Sets up the fixture, for example, opens a network connection.
- tearDown() — Tears down the fixture, for example, closes a network connection.
public
- dataTestIFrame() — Gets the data for testing the JHtml::iframe method.
- dataTestLink() — Gets the data for testing the JHtml::link method.
- testAddIncludePath() — Test...
- testCalendar() — Tests JHtml::calendar() method with and without 'readonly' attribute.
- testDate() — Test...
- testIframe() — Tests the iframe method.
- testImage() — Tests the image method.
- testIsRegistered() — Tests the isRegistered method.
- testLink() — Tests the link method.
- testRegister() — Test the register method.
- testScript() — Tests the script method.
- testSetFormatOptions() — Test...
- testStylesheet() — Tests the stylesheet method
- testTooltip() — Tests the tooltip method
- testTooltipText() — Tests JHtml::prepareTooltip().
- testUnregister() — Test the unregister method.
- test_() — Test the _ method.
- test_WithMissingClass() — Test the _ method.
- test_WithMissingFile() — Test the _ method.
- test_WithMissingMethod() — Test the _ method.
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.