Open Journal Systems  3.3.0
PKPRouterTestCase Class Reference
Inheritance diagram for PKPRouterTestCase:
PKPTestCase PKPComponentRouterTest PKPPageRouterTest

Public Member Functions

 testGetContext ()
 
 testGetContextForIndex ()
 
 testGetIndexUrl ()
 
 testGetIndexUrlRestful ()
 
 testGetRequestedContextPathWithEmptyContextParameters ()
 
 testGetRequestedContextPathWithEmptyPathInfo ()
 
 testGetRequestedContextPathWithFullContextParameters ()
 
 testGetRequestedContextPathWithFullPathInfo ()
 
 testGetRequestedContextPathWithInvalidLevel ()
 
 testGetRequestedContextPathWithInvalidPathInfo ()
 
 testGetRequestedContextPathWithPartialContextParameters ()
 
 testGetRequestedContextPathWithPartialPathInfo ()
 
 testGetSetApplication ()
 
 testGetSetDispatcher ()
 
 testIsCacheable ()
 
 testSupports ()
 
- Public Member Functions inherited from PKPTestCase
 getActualOutput ()
 

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
 

Detailed Description

Base tests class for PKPRouter tests.

@backupGlobals enabled

See also
PKPRouter

Definition at line 28 of file PKPRouterTestCase.inc.php.

Member Function Documentation

◆ _setUpMockDAOs()

PKPRouterTestCase::_setUpMockDAOs (   $firstContextPath = 'current-context1',
  $secondContextPath = 'current-context2',
  $firstContextIsNull = false,
  $secondContextIsNull = false 
)
protected

◆ _setUpMockEnvironment()

PKPRouterTestCase::_setUpMockEnvironment (   $pathInfoEnabled = self::PATHINFO_ENABLED,
  $contextDepth = 2,
  $contextList = array('firstContext', 'secondContext') 
)
protected

Set's up a mock environment for router tests (PKPApplication, PKPRequest) with customizable contexts and path info flag.

Parameters
$pathInfoEnabledboolean
$contextDepthinteger
$contextListarray
Returns
unknown

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().

◆ setUp()

PKPRouterTestCase::setUp ( )
protected

Reimplemented from PKPTestCase.

Reimplemented in PKPPageRouterTest, and PKPComponentRouterTest.

Definition at line 37 of file PKPRouterTestCase.inc.php.

References HookRegistry\rememberCalledHooks().

◆ tearDown()

PKPRouterTestCase::tearDown ( )
protected

Reimplemented from PKPTestCase.

Definition at line 43 of file PKPRouterTestCase.inc.php.

References HookRegistry\resetCalledHooks().

◆ testGetContext()

◆ testGetContextForIndex()

PKPRouterTestCase::testGetContextForIndex ( )

◆ testGetIndexUrl()

◆ testGetIndexUrlRestful()

PKPRouterTestCase::testGetIndexUrlRestful ( )

◆ testGetRequestedContextPathWithEmptyContextParameters()

PKPRouterTestCase::testGetRequestedContextPathWithEmptyContextParameters ( )

◆ testGetRequestedContextPathWithEmptyPathInfo()

PKPRouterTestCase::testGetRequestedContextPathWithEmptyPathInfo ( )

◆ testGetRequestedContextPathWithFullContextParameters()

PKPRouterTestCase::testGetRequestedContextPathWithFullContextParameters ( )

◆ testGetRequestedContextPathWithFullPathInfo()

PKPRouterTestCase::testGetRequestedContextPathWithFullPathInfo ( )

◆ testGetRequestedContextPathWithInvalidLevel()

PKPRouterTestCase::testGetRequestedContextPathWithInvalidLevel ( )

◆ testGetRequestedContextPathWithInvalidPathInfo()

PKPRouterTestCase::testGetRequestedContextPathWithInvalidPathInfo ( )

◆ testGetRequestedContextPathWithPartialContextParameters()

PKPRouterTestCase::testGetRequestedContextPathWithPartialContextParameters ( )
See also
PKPRouter::getRequestedContextPaths @runInSeparateProcess @preserveGlobalState disabled

Definition at line 183 of file PKPRouterTestCase.inc.php.

References _setUpMockEnvironment().

◆ testGetRequestedContextPathWithPartialPathInfo()

PKPRouterTestCase::testGetRequestedContextPathWithPartialPathInfo ( )

◆ testGetSetApplication()

PKPRouterTestCase::testGetSetApplication ( )

◆ testGetSetDispatcher()

PKPRouterTestCase::testGetSetDispatcher ( )

◆ testIsCacheable()

PKPRouterTestCase::testIsCacheable ( )
See also
PKPRouter::isCacheable

Definition at line 78 of file PKPRouterTestCase.inc.php.

◆ testSupports()

PKPRouterTestCase::testSupports ( )
See also
PKPRouter::supports

Reimplemented in PKPComponentRouterTest.

Definition at line 70 of file PKPRouterTestCase.inc.php.

Field Documentation

◆ $request

PKPRouterTestCase::$request

Definition at line 35 of file PKPRouterTestCase.inc.php.

◆ $router

PKPRouterTestCase::$router
protected

Definition at line 34 of file PKPRouterTestCase.inc.php.

◆ PATHINFO_DISABLED

const PKPRouterTestCase::PATHINFO_DISABLED = false

Definition at line 31 of file PKPRouterTestCase.inc.php.

◆ PATHINFO_ENABLED

const PKPRouterTestCase::PATHINFO_ENABLED = true

Definition at line 30 of file PKPRouterTestCase.inc.php.


The documentation for this class was generated from the following file: