|
Open Monograph Press
3.3.0
|
Data Fields | |
| $request | |
| const | PATHINFO_DISABLED = false |
| const | PATHINFO_ENABLED = true |
Data Fields inherited from PKPTestCase | |
| $mockedRegistryKeys = array() | |
| $registryBackup = array() | |
Protected Member Functions | |
| _setUpMockDAOs ($firstContextPath='current-context1', $secondContextPath='current-context2', $firstContextIsNull=false, $secondContextIsNull=false) | |
| _setUpMockEnvironment ($pathInfoEnabled=self::PATHINFO_ENABLED, $contextDepth=2, $contextList=array('firstContext', 'secondContext')) | |
| setUp () | |
| tearDown () | |
Protected Member Functions inherited from PKPTestCase | |
| getMockedDAOs () | |
| getMockedRegistryKeys () | |
| mockRequest ($path='index/test-page/test-op', $userId=null) | |
| setTestConfiguration ($config, $configPath='config') | |
Protected Attributes | |
| $router | |
Base tests class for PKPRouter tests.
@backupGlobals enabled
Definition at line 28 of file PKPRouterTestCase.inc.php.
|
protected |
Create two mock DAOs "FirstContextDAO" and "SecondContextDAO" that can be used with the standard environment set up when calling self::_setUpMockEnvironment(). Both DAOs will be registered with the DAORegistry and thereby be made available to the router.
| $firstContextPath | string |
| $secondContextPath | string |
| $firstContextIsNull | boolean |
| $secondContextIsNull | boolean |
Definition at line 346 of file PKPRouterTestCase.inc.php.
References $application, PKPApplication\get(), and DAORegistry\registerDAO().
Referenced by PKPComponentRouterTest\testRoute(), PKPComponentRouterTest\testUrlWithoutPathinfo(), PKPPageRouterTest\testUrlWithoutPathinfo(), PKPComponentRouterTest\testUrlWithoutPathinfoAndOverriddenBaseUrl(), PKPPageRouterTest\testUrlWithoutPathinfoAndOverriddenBaseUrl(), PKPComponentRouterTest\testUrlWithoutPathinfoAndSecondContextObjectIsNull(), PKPPageRouterTest\testUrlWithoutPathinfoAndSecondContextObjectIsNull(), PKPPageRouterTest\testUrlWithPathinfo(), PKPComponentRouterTest\testUrlWithPathinfo(), PKPPageRouterTest\testUrlWithPathinfoAndOverriddenBaseUrl(), PKPComponentRouterTest\testUrlWithPathinfoAndOverriddenBaseUrl(), PKPPageRouterTest\testUrlWithPathinfoAndOverriddenNewContext(), PKPComponentRouterTest\testUrlWithPathinfoAndSecondContextObjectIsNull(), and PKPPageRouterTest\testUrlWithPathinfoAndSecondContextObjectIsNull().
|
protected |
Set's up a mock environment for router tests (PKPApplication, PKPRequest) with customizable contexts and path info flag.
| $pathInfoEnabled | boolean |
| $contextDepth | integer |
| $contextList | array |
Definition at line 300 of file PKPRouterTestCase.inc.php.
References Registry\set().
Referenced by PKPPageRouterTest\testGetCacheFilenameWithoutPathinfo(), PKPPageRouterTest\testGetCacheFilenameWithPathinfo(), testGetContext(), testGetContextForIndex(), testGetIndexUrl(), testGetIndexUrlRestful(), PKPComponentRouterTest\testGetRequestedComponentWithPathinfo(), PKPComponentRouterTest\testGetRequestedComponentWithPathinfoAndMalformedComponentString(), PKPComponentRouterTest\testGetRequestedComponentWithPathinfoDisabled(), testGetRequestedContextPathWithEmptyContextParameters(), testGetRequestedContextPathWithEmptyPathInfo(), testGetRequestedContextPathWithFullContextParameters(), testGetRequestedContextPathWithFullPathInfo(), testGetRequestedContextPathWithInvalidLevel(), testGetRequestedContextPathWithInvalidPathInfo(), testGetRequestedContextPathWithPartialContextParameters(), testGetRequestedContextPathWithPartialPathInfo(), PKPPageRouterTest\testGetRequestedOpWithEmptyOp(), PKPComponentRouterTest\testGetRequestedOpWithPathinfo(), PKPPageRouterTest\testGetRequestedOpWithPathinfo(), PKPComponentRouterTest\testGetRequestedOpWithPathinfoAndMalformedOpString(), PKPComponentRouterTest\testGetRequestedOpWithPathinfoDisabled(), PKPPageRouterTest\testGetRequestedOpWithPathinfoDisabled(), PKPPageRouterTest\testGetRequestedOpWithPathinfoDisabledAndEmptyOp(), PKPComponentRouterTest\testGetRequestedOpWithPathinfoDisabledAndMissingComponent(), PKPPageRouterTest\testGetRequestedPageWithEmtpyPage(), PKPPageRouterTest\testGetRequestedPageWithPathinfo(), PKPPageRouterTest\testGetRequestedPageWithPathinfoDisabled(), PKPPageRouterTest\testGetRequestedPageWithPathinfoDisabledAndEmtpyPage(), testGetSetApplication(), testGetSetDispatcher(), PKPPageRouterTest\testIsCacheableNotInstalled(), PKPPageRouterTest\testIsCacheableWithoutPathinfo(), PKPPageRouterTest\testIsCacheableWithoutPathinfoSuccess(), PKPPageRouterTest\testIsCacheableWithPathinfo(), PKPPageRouterTest\testIsCacheableWithPathinfoSuccess(), PKPPageRouterTest\testIsCacheableWithPost(), PKPComponentRouterTest\testRoute(), PKPComponentRouterTest\testSupportsWithPathinfoSuccessful(), PKPComponentRouterTest\testSupportsWithPathinfoUnsuccessfulComponentFileDoesNotExist(), PKPComponentRouterTest\testSupportsWithPathinfoUnsuccessfulNoComponentNoMarker(), PKPComponentRouterTest\testSupportsWithPathinfoUnsuccessfulNoComponentNotEnoughPathElements(), PKPComponentRouterTest\testUrlWithoutPathinfo(), PKPPageRouterTest\testUrlWithoutPathinfo(), PKPComponentRouterTest\testUrlWithoutPathinfoAndOverriddenBaseUrl(), PKPPageRouterTest\testUrlWithoutPathinfoAndOverriddenBaseUrl(), PKPComponentRouterTest\testUrlWithoutPathinfoAndSecondContextObjectIsNull(), PKPPageRouterTest\testUrlWithoutPathinfoAndSecondContextObjectIsNull(), PKPPageRouterTest\testUrlWithPathinfo(), PKPComponentRouterTest\testUrlWithPathinfo(), PKPPageRouterTest\testUrlWithPathinfoAndOverriddenBaseUrl(), PKPComponentRouterTest\testUrlWithPathinfoAndOverriddenBaseUrl(), PKPPageRouterTest\testUrlWithPathinfoAndOverriddenNewContext(), PKPComponentRouterTest\testUrlWithPathinfoAndSecondContextObjectIsNull(), and PKPPageRouterTest\testUrlWithPathinfoAndSecondContextObjectIsNull().
|
protected |
Reimplemented from PKPTestCase.
Reimplemented in PKPPageRouterTest, and PKPComponentRouterTest.
Definition at line 37 of file PKPRouterTestCase.inc.php.
References HookRegistry\rememberCalledHooks().
|
protected |
Reimplemented from PKPTestCase.
Definition at line 43 of file PKPRouterTestCase.inc.php.
References HookRegistry\resetCalledHooks().
| PKPRouterTestCase::testGetContext | ( | ) |
Definition at line 196 of file PKPRouterTestCase.inc.php.
References $application, _setUpMockEnvironment(), PKPApplication\get(), and DAORegistry\registerDAO().
| PKPRouterTestCase::testGetContextForIndex | ( | ) |
Definition at line 230 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetIndexUrl | ( | ) |
Definition at line 245 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment(), HookRegistry\getCalledHooks(), HookRegistry\resetCalledHooks(), and PKPTestCase\setTestConfiguration().
| PKPRouterTestCase::testGetIndexUrlRestful | ( | ) |
Definition at line 281 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment(), and PKPTestCase\setTestConfiguration().
| PKPRouterTestCase::testGetRequestedContextPathWithEmptyContextParameters | ( | ) |
Definition at line 148 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetRequestedContextPathWithEmptyPathInfo | ( | ) |
Definition at line 98 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetRequestedContextPathWithFullContextParameters | ( | ) |
Definition at line 160 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment(), HookRegistry\getCalledHooks(), and HookRegistry\resetCalledHooks().
| PKPRouterTestCase::testGetRequestedContextPathWithFullPathInfo | ( | ) |
Definition at line 109 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment(), HookRegistry\getCalledHooks(), and HookRegistry\resetCalledHooks().
| PKPRouterTestCase::testGetRequestedContextPathWithInvalidLevel | ( | ) |
Definition at line 88 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetRequestedContextPathWithInvalidPathInfo | ( | ) |
Definition at line 138 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetRequestedContextPathWithPartialContextParameters | ( | ) |
Definition at line 183 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetRequestedContextPathWithPartialPathInfo | ( | ) |
Definition at line 128 of file PKPRouterTestCase.inc.php.
References _setUpMockEnvironment().
| PKPRouterTestCase::testGetSetApplication | ( | ) |
Definition at line 52 of file PKPRouterTestCase.inc.php.
References $application, and _setUpMockEnvironment().
| PKPRouterTestCase::testGetSetDispatcher | ( | ) |
Definition at line 61 of file PKPRouterTestCase.inc.php.
References $application, and _setUpMockEnvironment().
| PKPRouterTestCase::testIsCacheable | ( | ) |
Definition at line 78 of file PKPRouterTestCase.inc.php.
| PKPRouterTestCase::testSupports | ( | ) |
Reimplemented in PKPComponentRouterTest.
Definition at line 70 of file PKPRouterTestCase.inc.php.
| PKPRouterTestCase::$request |
Definition at line 35 of file PKPRouterTestCase.inc.php.
|
protected |
Definition at line 34 of file PKPRouterTestCase.inc.php.
| const PKPRouterTestCase::PATHINFO_DISABLED = false |
Definition at line 31 of file PKPRouterTestCase.inc.php.
| const PKPRouterTestCase::PATHINFO_ENABLED = true |
Definition at line 30 of file PKPRouterTestCase.inc.php.