phpDocumentor GalleryCore
PHPUnit
[ class tree: GalleryCore ] [ index: GalleryCore ] [ all elements ]

Class: UrlGeneratorTest

Source Location: /modules/core/test/phpunit/UrlGeneratorTest.class

Class UrlGeneratorTest

Class Overview

URL generator tests.

Located in /modules/core/test/phpunit/UrlGeneratorTest.class [line 33]

TestCase
   |
   --GalleryTestCase
      |
      --UrlGeneratorTest

Properties

Methods

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryTestCase

GalleryTestCase::$_cleanup

Inherited From GalleryTestCase

GalleryTestCase::GalleryTestCase()
GalleryTestCase::assert()
GalleryTestCase::assertEquals()
GalleryTestCase::assertErrorEquals()
Fail if the provided GalleryStatus object does not contain the given error code.
GalleryTestCase::assertEventFired()
Fail if the provided event name was not fired.
GalleryTestCase::assertEventNotFired()
Fail if the provided event name was fired
GalleryTestCase::DeepCompare()
GalleryTestCase::failWithStatus()
This is deprecated in Gallery 2.3 -- now tests should just return $ret and let the framework generate the right failure message.
GalleryTestCase::getEntityCounter()
Get the entity counter listener which contains the types and number of elements deleted.
GalleryTestCase::setUp()
GalleryTestCase::tearDown()
GalleryTestCase::_array_unshift_key_value()
Utility method to array_unshift a single key => value pair.
GalleryTestCase::_becomeGuestUser()
GalleryTestCase::_createDerivative()
GalleryTestCase::_createLinkedItem()
Create a random link item
GalleryTestCase::_createRandomAlbum()
Create a random album
GalleryTestCase::_createRandomDataItem()
Create a random data item
GalleryTestCase::_createRandomGroup()
Create a random group
GalleryTestCase::_createRandomUser()
Create a random user
GalleryTestCase::_createUser()
GalleryTestCase::_deleteAndVerifyEntity()
GalleryTestCase::_disableUserName()
Convenience method to mark a username as disabled.
GalleryTestCase::_getRootId()
GalleryTestCase::_getUnusedId()
Get an id that is not used for anything.
GalleryTestCase::_initEventListenersForTest()
Disable all but some core event listeners by default.
GalleryTestCase::_markEventListenersForCleanup()
Create a backup of the registered event listeners which will be restored in tearDown.
GalleryTestCase::_markFactoryForCleanup()
Create a backup of the factory data which will be restored in tearDown.
GalleryTestCase::_markFactoryModuleForCleanup()
GalleryTestCase::_markForCleanup()
GalleryTestCase::_markPluginParametersForCleanup()
Store plugin parameters to be restored in tearDown
GalleryTestCase::_markToolkitForCleanup()
GalleryTestCase::_registerEventListener()
Register a The NullEventListener for a test
GalleryTestCase::_registerFactoryImplementationForTest()
Register a factory implementation temporarily for this test.
GalleryTestCase::_registerTestEventListener()
Register and event name and associated listener (deprecated).
GalleryTestCase::_setMarkupType()
Set core parameter for markup type.
GalleryTestCase::_signUrl()
Adds an authToken to the given URL
GalleryTestCase::_unregisterFactoryImplementationForTest()
Unregister a specific factory implementation or all implementations of a spefific type temporarily for this test.
GalleryTestCase::_verifyEntity()
GalleryTestCase::_verifyFields()
GalleryTestCase::_verifyMissing()

[ Top ]
Property Summary
mixed   $_savedGet  
mixed   $_urlGenerator  

[ Top ]
Method Summary
UrlGeneratorTest   UrlGeneratorTest()  
void   setUp()  
void   tearDown()  
void   testAppendNestedParamsToUrl()  
void   testAppendParamsToUrl()  
void   testAppendParamsToUrlDoesNotHandleBracketsInKeyString()  
void   testAppendParamsToUrlEmptyParams()  
void   testAppendParamsToUrlNoHtmlEntities()  
void   testAppendParamsToUrlNoPrefix()  
void   testAppendParamsToUrlNoUrlEncode()  
void   testAppendParamsToUrlPreservesParamOrder()  
void   testAppendParamsToUrlUrlEncodesParamKeyCorrectly()  
void   testAppendParamsToUrlWithQueryString()  
void   testBaseFileWithQMark()  
void   testCurrentUrlToken()  
void   testDetectHeaderInjectionAttack()  
void   testDetectPhishingAttack()  
void   testDetectPhishingAttackThroughFormUrl()  
void   testEmbedForceSessionId()  
void   testGenerateFullUrlOff()  
void   testGenerateFullUrlOn()  
void   testGenerateFullUrlOnForRelative()  
void   testGenerateHref()  
void   testGenerateReturnUrl()  
void   testGenerateServerRelativeUrlOff()  
void   testGenerateServerRelativeUrlOn()  
void   testGenerateServerRelativeUrlOnForRelative()  
void   testGenerateServerRelativeUrlOnFullUrlOn()  
void   testGenerateUrl()  
void   testGenerateUrlAddsAuthTokenForControllerUrls()  
void   testGenerateUrlCachesReturnUrlByCurrentView()  
void   testGenerateUrlCookielessEmbedded()  
void   testGenerateUrlEmbeddedDownloadItemCookiePathNotSet()  
void   testGenerateUrlEmbeddedFullBaseUri()  
void   testGenerateUrlEmbeddedMultisite()  
void   testGenerateUrlEmbeddedPathBaseUri()  
void   testGenerateUrlEmbeddedWithCookiePathSet()  
void   testGenerateUrlForceSessionId()  
void   testGenerateUrlForceSessionIdFalse()  
void   testGenerateUrlForController()  
void   testGenerateUrlForView()  
void   testGenerateUrlInitWithForceEmptyFilePart()  
void   testGenerateUrlInMultisite()  
void   testGenerateUrlNoHtmlEntities()  
void   testGenerateUrlNoUrlEncode()  
void   testGenerateUrlSwapsInReturnUrl()  
void   testGenerateUrlUseAuthTokenFalseHasNoAuthToken()  
void   testGenerateUrlUseAuthTokenTrueControllerUrlHasAuthToken()  
void   testGenerateUrlUseAuthTokenTrueHasAuthToken()  
void   testGenerateUrlWithForceSessionIdFalseOverridesEmbedForceSessionId()  
void   testGenerateUrlWithoutPersistentSession()  
void   testGenerateUrlWithoutSession()  
void   testGenerateUrlWithProtocol()  
void   testGetCacheableUrl()  
void   testGetCookiePath()  
void   testGetCurrentRequestUri()  
void   testGetCurrentRequestUriCachesResult()  
void   testGetCurrentRequestUriForAbsoluteUrl()  
void   testGetCurrentUrl()  
void   testGetCurrentUrlDir()  
void   testGetCurrentUrlDirBaseFileNotFound()  
void   testGetHostName()  
void   testGetHostNameEmbeddedOverride()  
void   testGetHostNameOverride()  
void   testGetNavigationReturnUrlArrayParam()  
void   testGetNavigationReturnUrlNoCookies()  
void   testInit()   Test non-standard ports go in both HTTP_HOST and SERVER_PORT
void   testInitDefault()  
void   testInitEmbedded()  
void   testInitNavigationHandlesEmbedUriWithoutFilePart()  
void   testInitOverride()  
void   testInitSetsIsCookiePathConfiguredIfEmbedded()  
void   testLocalUrlMapAddNew()  
void   testLocalUrlMapCacheHit()  
void   testLocalUrlMapForceCheckDoesNotSave()  
void   testLocalUrlMapSave()  
void   testMakeAbsoluteUrlForAbsoluteUrl()  
void   testMakeAbsoluteUrlForRelativeUrl()  
void   testMakeAbsoluteUrlForServerRelativeUrl()  
void   testMakeRelativeUrl()  
void   testMakeRelativeUrlBaseFileInReturnUrl()  
void   testMakeRelativeUrlBaseFileNotInRequestUri()  
void   testMakeRelativeUrlBaseFileNotInReturnUrl()  
void   testMakeRelativeUrlCachesStaticComponents()  
void   testMakeRelativeUrlDifferentServerPath()  
void   testMakeRelativeUrlDifferentSubdomains()  
void   testMakeRelativeUrlDontForceServerRelative()  
void   testMakeRelativeUrlForceServerRelative()  
void   testMakeRelativeUrlOtherProtocol()  
void   testMakeServerRelativeUrl()  
void   testMakeUrl1()   Basic tests
void   testMakeUrl2()   Test non-standard ports go in both HTTP_HOST and SERVER_PORT (also tests ::init)
void   testMakeUrl3()   Test browsing to https://example.com
void   testMakeUrl4()   Test non-standard port only in SERVER_PORT. This is the case where the browser went to http://example.com and got internally redirected to something like http://internal.server:82/. We want to serve up a new url that the browser can handle.
void   testMakeUrl5()  
void   testOmitDefaults()  
void   testParseUri()  
void   testRelativeUrlOverrides()  
void   _initNewUrlGenerator()  
void   _prepareGenerateUrl()  

[ Top ]
Properties
mixed   $_savedGet [line 35]

[ Top ]
mixed   $_urlGenerator [line 34]

[ Top ]
Methods
Constructor UrlGeneratorTest  [line 37]

  UrlGeneratorTest UrlGeneratorTest( $methodName  )

Parameters:
   $methodName: 


[ Top ]
setUp  [line 41]

  void setUp( )



Redefinition of:
GalleryTestCase::setUp()

[ Top ]
tearDown  [line 74]

  void tearDown( )



Redefinition of:
GalleryTestCase::tearDown()

[ Top ]
testAppendNestedParamsToUrl  [line 1701]

  void testAppendNestedParamsToUrl( )



[ Top ]
testAppendParamsToUrl  [line 1692]

  void testAppendParamsToUrl( )



[ Top ]
testAppendParamsToUrlDoesNotHandleBracketsInKeyString  [line 1781]

  void testAppendParamsToUrlDoesNotHandleBracketsInKeyString( )



[ Top ]
testAppendParamsToUrlEmptyParams  [line 1771]

  void testAppendParamsToUrlEmptyParams( )



[ Top ]
testAppendParamsToUrlNoHtmlEntities  [line 1730]

  void testAppendParamsToUrlNoHtmlEntities( )



[ Top ]
testAppendParamsToUrlNoPrefix  [line 1720]

  void testAppendParamsToUrlNoPrefix( )



[ Top ]
testAppendParamsToUrlNoUrlEncode  [line 1749]

  void testAppendParamsToUrlNoUrlEncode( )



[ Top ]
testAppendParamsToUrlPreservesParamOrder  [line 1759]

  void testAppendParamsToUrlPreservesParamOrder( )



[ Top ]
testAppendParamsToUrlUrlEncodesParamKeyCorrectly  [line 1740]

  void testAppendParamsToUrlUrlEncodesParamKeyCorrectly( )



[ Top ]
testAppendParamsToUrlWithQueryString  [line 1711]

  void testAppendParamsToUrlWithQueryString( )



[ Top ]
testBaseFileWithQMark  [line 931]

  void testBaseFileWithQMark( )



[ Top ]
testCurrentUrlToken  [line 1201]

  void testCurrentUrlToken( )



[ Top ]
testDetectHeaderInjectionAttack  [line 1071]

  void testDetectHeaderInjectionAttack( )



[ Top ]
testDetectPhishingAttack  [line 1014]

  void testDetectPhishingAttack( )



[ Top ]
testDetectPhishingAttackThroughFormUrl  [line 1055]

  void testDetectPhishingAttackThroughFormUrl( )



[ Top ]
testEmbedForceSessionId  [line 1303]

  void testEmbedForceSessionId( )



[ Top ]
testGenerateFullUrlOff  [line 1369]

  void testGenerateFullUrlOff( )



[ Top ]
testGenerateFullUrlOn  [line 1358]

  void testGenerateFullUrlOn( )



[ Top ]
testGenerateFullUrlOnForRelative  [line 1363]

  void testGenerateFullUrlOnForRelative( )



[ Top ]
testGenerateHref  [line 371]

  void testGenerateHref( )



[ Top ]
testGenerateReturnUrl  [line 451]

  void testGenerateReturnUrl( )



[ Top ]
testGenerateServerRelativeUrlOff  [line 1387]

  void testGenerateServerRelativeUrlOff( )



[ Top ]
testGenerateServerRelativeUrlOn  [line 1374]

  void testGenerateServerRelativeUrlOn( )



[ Top ]
testGenerateServerRelativeUrlOnForRelative  [line 1380]

  void testGenerateServerRelativeUrlOnForRelative( )



[ Top ]
testGenerateServerRelativeUrlOnFullUrlOn  [line 1394]

  void testGenerateServerRelativeUrlOnFullUrlOn( )



[ Top ]
testGenerateUrl  [line 164]

  void testGenerateUrl( )



[ Top ]
testGenerateUrlAddsAuthTokenForControllerUrls  [line 1644]

  void testGenerateUrlAddsAuthTokenForControllerUrls( )



[ Top ]
testGenerateUrlCachesReturnUrlByCurrentView  [line 1123]

  void testGenerateUrlCachesReturnUrlByCurrentView( )



[ Top ]
testGenerateUrlCookielessEmbedded  [line 220]

  void testGenerateUrlCookielessEmbedded( )



[ Top ]
testGenerateUrlEmbeddedDownloadItemCookiePathNotSet  [line 272]

  void testGenerateUrlEmbeddedDownloadItemCookiePathNotSet( )



[ Top ]
testGenerateUrlEmbeddedFullBaseUri  [line 187]

  void testGenerateUrlEmbeddedFullBaseUri( )



[ Top ]
testGenerateUrlEmbeddedMultisite  [line 554]

  void testGenerateUrlEmbeddedMultisite( )



[ Top ]
testGenerateUrlEmbeddedPathBaseUri  [line 204]

  void testGenerateUrlEmbeddedPathBaseUri( )



[ Top ]
testGenerateUrlEmbeddedWithCookiePathSet  [line 329]

  void testGenerateUrlEmbeddedWithCookiePathSet( )



[ Top ]
testGenerateUrlForceSessionId  [line 483]

  void testGenerateUrlForceSessionId( )



[ Top ]
testGenerateUrlForceSessionIdFalse  [line 503]

  void testGenerateUrlForceSessionIdFalse( )



[ Top ]
testGenerateUrlForController  [line 265]

  void testGenerateUrlForController( )



[ Top ]
testGenerateUrlForView  [line 258]

  void testGenerateUrlForView( )



[ Top ]
testGenerateUrlInitWithForceEmptyFilePart  [line 306]

  void testGenerateUrlInitWithForceEmptyFilePart( )



[ Top ]
testGenerateUrlInMultisite  [line 518]

  void testGenerateUrlInMultisite( )



[ Top ]
testGenerateUrlNoHtmlEntities  [line 417]

  void testGenerateUrlNoHtmlEntities( )



[ Top ]
testGenerateUrlNoUrlEncode  [line 433]

  void testGenerateUrlNoUrlEncode( )



[ Top ]
testGenerateUrlSwapsInReturnUrl  [line 1103]

  void testGenerateUrlSwapsInReturnUrl( )



[ Top ]
testGenerateUrlUseAuthTokenFalseHasNoAuthToken  [line 1680]

  void testGenerateUrlUseAuthTokenFalseHasNoAuthToken( )



[ Top ]
testGenerateUrlUseAuthTokenTrueControllerUrlHasAuthToken  [line 1667]

  void testGenerateUrlUseAuthTokenTrueControllerUrlHasAuthToken( )



[ Top ]
testGenerateUrlUseAuthTokenTrueHasAuthToken  [line 1656]

  void testGenerateUrlUseAuthTokenTrueHasAuthToken( )



[ Top ]
testGenerateUrlWithForceSessionIdFalseOverridesEmbedForceSessionId  [line 1349]

  void testGenerateUrlWithForceSessionIdFalseOverridesEmbedForceSessionId( )



[ Top ]
testGenerateUrlWithoutPersistentSession  [line 1576]

  void testGenerateUrlWithoutPersistentSession( )



[ Top ]
testGenerateUrlWithoutSession  [line 355]

  void testGenerateUrlWithoutSession( )



[ Top ]
testGenerateUrlWithProtocol  [line 1639]

  void testGenerateUrlWithProtocol( )



[ Top ]
testGetCacheableUrl  [line 1570]

  void testGetCacheableUrl( )



[ Top ]
testGetCookiePath  [line 1209]

  void testGetCookiePath( )



[ Top ]
testGetCurrentRequestUri  [line 597]

  void testGetCurrentRequestUri( )



[ Top ]
testGetCurrentRequestUriCachesResult  [line 634]

  void testGetCurrentRequestUriCachesResult( )



[ Top ]
testGetCurrentRequestUriForAbsoluteUrl  [line 622]

  void testGetCurrentRequestUriForAbsoluteUrl( )



[ Top ]
testGetCurrentUrl  [line 643]

  void testGetCurrentUrl( )



[ Top ]
testGetCurrentUrlDir  [line 662]

  void testGetCurrentUrlDir( )



[ Top ]
testGetCurrentUrlDirBaseFileNotFound  [line 691]

  void testGetCurrentUrlDirBaseFileNotFound( )



[ Top ]
testGetHostName  [line 702]

  void testGetHostName( )



[ Top ]
testGetHostNameEmbeddedOverride  [line 728]

  void testGetHostNameEmbeddedOverride( )



[ Top ]
testGetHostNameOverride  [line 716]

  void testGetHostNameOverride( )



[ Top ]
testGetNavigationReturnUrlArrayParam  [line 998]

  void testGetNavigationReturnUrlArrayParam( )



[ Top ]
testGetNavigationReturnUrlNoCookies  [line 962]

  void testGetNavigationReturnUrlNoCookies( )



[ Top ]
testInit  [line 856]

  void testInit( )

Test non-standard ports go in both HTTP_HOST and SERVER_PORT



[ Top ]
testInitDefault  [line 872]

  void testInitDefault( )



[ Top ]
testInitEmbedded  [line 909]

  void testInitEmbedded( )



[ Top ]
testInitNavigationHandlesEmbedUriWithoutFilePart  [line 1086]

  void testInitNavigationHandlesEmbedUriWithoutFilePart( )



[ Top ]
testInitOverride  [line 891]

  void testInitOverride( )



[ Top ]
testInitSetsIsCookiePathConfiguredIfEmbedded  [line 1534]

  void testInitSetsIsCookiePathConfiguredIfEmbedded( )



[ Top ]
testLocalUrlMapAddNew  [line 1790]

  void testLocalUrlMapAddNew( )



[ Top ]
testLocalUrlMapCacheHit  [line 1806]

  void testLocalUrlMapCacheHit( )



[ Top ]
testLocalUrlMapForceCheckDoesNotSave  [line 1856]

  void testLocalUrlMapForceCheckDoesNotSave( )



[ Top ]
testLocalUrlMapSave  [line 1820]

  void testLocalUrlMapSave( )



[ Top ]
testMakeAbsoluteUrlForAbsoluteUrl  [line 838]

  void testMakeAbsoluteUrlForAbsoluteUrl( )



[ Top ]
testMakeAbsoluteUrlForRelativeUrl  [line 816]

  void testMakeAbsoluteUrlForRelativeUrl( )



[ Top ]
testMakeAbsoluteUrlForServerRelativeUrl  [line 825]

  void testMakeAbsoluteUrlForServerRelativeUrl( )



[ Top ]
testMakeRelativeUrl  [line 1401]

  void testMakeRelativeUrl( )



[ Top ]
testMakeRelativeUrlBaseFileInReturnUrl  [line 1440]

  void testMakeRelativeUrlBaseFileInReturnUrl( )



[ Top ]
testMakeRelativeUrlBaseFileNotInRequestUri  [line 1432]

  void testMakeRelativeUrlBaseFileNotInRequestUri( )



[ Top ]
testMakeRelativeUrlBaseFileNotInReturnUrl  [line 1449]

  void testMakeRelativeUrlBaseFileNotInReturnUrl( )



[ Top ]
testMakeRelativeUrlCachesStaticComponents  [line 1472]

  void testMakeRelativeUrlCachesStaticComponents( )



[ Top ]
testMakeRelativeUrlDifferentServerPath  [line 1466]

  void testMakeRelativeUrlDifferentServerPath( )



[ Top ]
testMakeRelativeUrlDifferentSubdomains  [line 1425]

  void testMakeRelativeUrlDifferentSubdomains( )



[ Top ]
testMakeRelativeUrlDontForceServerRelative  [line 1412]

  void testMakeRelativeUrlDontForceServerRelative( )



[ Top ]
testMakeRelativeUrlForceServerRelative  [line 1406]

  void testMakeRelativeUrlForceServerRelative( )



[ Top ]
testMakeRelativeUrlOtherProtocol  [line 1458]

  void testMakeRelativeUrlOtherProtocol( )



[ Top ]
testMakeServerRelativeUrl  [line 1418]

  void testMakeServerRelativeUrl( )



[ Top ]
testMakeUrl1  [line 743]

  void testMakeUrl1( )

Basic tests



[ Top ]
testMakeUrl2  [line 757]

  void testMakeUrl2( )

Test non-standard ports go in both HTTP_HOST and SERVER_PORT (also tests ::init)



[ Top ]
testMakeUrl3  [line 770]

  void testMakeUrl3( )

Test browsing to https://example.com



[ Top ]
testMakeUrl4  [line 787]

  void testMakeUrl4( )

Test non-standard port only in SERVER_PORT. This is the case where the browser went to http://example.com and got internally redirected to something like http://internal.server:82/. We want to serve up a new url that the browser can handle.



[ Top ]
testMakeUrl5  [line 798]

  void testMakeUrl5( )



[ Top ]
testOmitDefaults  [line 1610]

  void testOmitDefaults( )



[ Top ]
testParseUri  [line 1494]

  void testParseUri( )



[ Top ]
testRelativeUrlOverrides  [line 1170]

  void testRelativeUrlOverrides( )



[ Top ]
_initNewUrlGenerator  [line 95]

  void _initNewUrlGenerator( [ $baseUri = null], [ $g2Uri = null], [ $embedSessionString = null]  )

Parameters:
   $baseUri: 
   $g2Uri: 
   $embedSessionString: 


[ Top ]
_prepareGenerateUrl  [line 106]

  void _prepareGenerateUrl( $cookiePath, $baseUri, $g2Uri, [ $embedSessionString = null]  )

Parameters:
   $cookiePath: 
   $baseUri: 
   $g2Uri: 
   $embedSessionString: 


[ Top ]

Documentation generated on Fri, 08 Oct 2010 06:02:41 -0700 by phpDocumentor 1.3.0RC6