\JOAuth1ClientTest
Test class for JOAuth1Client.
Synopsis
class JOAuth1ClientTest
extends TestCase
{
- // members
- protected JInput $input;
- protected JRegistry $options;
- protected JHttp $client;
- protected JOAuth1ClientInspector $object;
- protected JApplicationWeb $application;
- protected $sampleString;
- protected $errorString;
- // Inherited members from TestCase
- protected $expectedErrors;
- // methods
- protected void setUp()
- protected void tearDown()
- public array seedAuthenticate()
- public void testAuthenticate()
- public void testGenerateRequestTokenFailure()
- public array seedOauthRequest()
- public void testOauthRequest()
- public void testSafeEncodeEmpty()
- // 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
Members
protected
- $application — JApplicationWeb
- $client — JHttp
- $errorString — string
- $expectedErrors — array
- $input — JInput
- $object
—
JOAuth1ClientInspector
An instance of the object to test. - $options — JRegistry
- $sampleString — string
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
- seedAuthenticate() — Provides test data.
- seedOauthRequest() — Provides test data.
- testAuthenticate() — Tests the authenticate method
- testGenerateRequestTokenFailure() — Tests the _generateRequestToken method - failure
- testOauthRequest() — Tests the oauthRequest method
- testSafeEncodeEmpty() — Tests the safeEncode
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.