\JOpenstreetmapElementsTest
Test class for JOpenstreetmapElements.
Synopsis
class JOpenstreetmapElementsTest
extends TestCase
{
- // members
- protected JRegistry $options;
- protected JHttp $client;
- protected JInput $input;
- protected JOpenstreetmapElements $object;
- protected JOpenstreetmapOauth $oauth;
- protected $sampleXml;
- protected $errorString;
- // Inherited members from TestCase
- protected $expectedErrors;
- // methods
- protected void setUp()
- public array testCreateNode()
- public void testCreateNodeFailure()
- public array testCreateWay()
- public void testCreateWayFailure()
- public array testCreateRelation()
- public void testCreateRelationFailure()
- public array seedElement()
- public array seedElementFailure()
- public void testReadElement()
- public void testReadElementFailure()
- public array testUpdateElement()
- public array testUpdateElementFailure()
- public array testDeleteElement()
- public array testDeleteElementFailure()
- public void testHistoryOfElement()
- public void testHistoryOfElementFailure()
- public void testVersionOfElement()
- public void testVersionOfElementFailure()
- public array seedElements()
- public array seedElementsFailure()
- public void testMultiFetchElements()
- public void testMultiFetchElementsFailure()
- public void testRelationsForElement()
- public void testRelationsForElementFailure()
- public void testWaysForNode()
- public void testWaysForNodeFailure()
- public array seedFullElement()
- public array seedFullElementFailure()
- public void testFullElement()
- public void testFullElementFailure()
- public void testRedaction()
- public void testRedactionFailure()
- // 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
- $client — JHttp
- $errorString — string
- $expectedErrors — array
- $input — JInput
- $oauth — JOpenstreetmapOauth
- $object — JOpenstreetmapElements
- $options — JRegistry
- $sampleXml — string
Methods
protected
- setUp() — Sets up the fixture, for example, opens a network connection.
public
- seedElement() — Provides test data for element type.
- seedElementFailure() — Provides test data for element type - faliures
- seedElements() — Provides test data for element type.
- seedElementsFailure() — Provides test data for element type - faliures
- seedFullElement() — Provides test data for full element type.
- seedFullElementFailure() — Provides test data for full element type - faliures
- testCreateNode() — Tests the createNode method
- testCreateNodeFailure() — Tests the createNode method - failure
- testCreateRelation() — Tests the createRelation method
- testCreateRelationFailure() — Tests the createRelation method - failure
- testCreateWay() — Tests the createWay method
- testCreateWayFailure() — Tests the createWay method - failure
- testDeleteElement() — Tests the deleteElement method
- testDeleteElementFailure() — Tests the deleteElement method - failure
- testFullElement() — Tests the fullElement method
- testFullElementFailure() — Tests the fullElement method - failure
- testHistoryOfElement() — Tests the historyOfElement method
- testHistoryOfElementFailure() — Tests the historyOfElement method - failure
- testMultiFetchElements() — Tests the multiFetchElements method
- testMultiFetchElementsFailure() — Tests the multiFetchElements method - failure
- testReadElement() — Tests the readElement method
- testReadElementFailure() — Tests the readElement method - failure
- testRedaction() — Tests the redaction method
- testRedactionFailure() — Tests the redaction method - failure
- testRelationsForElement() — Tests the relationsForElement method
- testRelationsForElementFailure() — Tests the relationsForElement method - failure
- testUpdateElement() — Tests the updateElement method
- testUpdateElementFailure() — Tests the updateElement method - failure
- testVersionOfElement() — Tests the versionOfElement method
- testVersionOfElementFailure() — Tests the versionOfElement method - failure
- testWaysForNode() — Tests the waysForNode method
- testWaysForNodeFailure() — Tests the waysForNode method - failure
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.