TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Tests\Unit\Http\UriTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Http\UriTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

 constructorSetsAllProperties ()
 
 canSerializeToString ()
 
 withSchemeReturnsNewInstanceWithNewScheme ()
 
 withUserInfoReturnsNewInstanceWithProvidedUser ()
 
 withUserInfoReturnsNewInstanceWithProvidedUserAndPassword ()
 
 withHostReturnsNewInstanceWithProvidedHost ()
 
 validPortsDataProvider ()
 
 withPortReturnsNewInstanceWithProvidedPort ($port)
 
 invalidPortsDataProvider ()
 
 withPortRaisesExceptionForInvalidPorts ($port)
 
 withPathReturnsNewInstanceWithProvidedPath ()
 
 invalidPathsDataProvider ()
 
 withPathRaisesExceptionForInvalidPaths ($path)
 
 withQueryReturnsNewInstanceWithProvidedQuery ()
 
 invalidQueryStringsDataProvider ()
 
 withQueryRaisesExceptionForInvalidQueryStrings ($query)
 
 withFragmentReturnsNewInstanceWithProvidedFragment ()
 
 authorityInfoDataProvider ()
 
 getAuthorityReturnsExpectedValues ($url, $expected)
 
 canEmitOriginFormUrl ()
 
 settingEmptyPathOnAbsoluteUriReturnsAnEmptyPath ()
 
 stringRepresentationOfAbsoluteUriWithNoPathSetsAnEmptyPath ()
 
 getPathOnOriginFormRemainsAnEmptyPath ()
 
 stringRepresentationOfOriginFormWithNoPathRetainsEmptyPath ()
 
 invalidConstructorUrisDataProvider ()
 
 constructorRaisesExceptionForNonStringURI ($uri)
 
 constructorRaisesExceptionForSeriouslyMalformedURI ()
 
 withSchemeStripsOffDelimiter ()
 
 invalidSchemesDataProvider ()
 
 constructWithUnsupportedSchemeRaisesAnException ($scheme)
 
 withSchemeUsingUnsupportedSchemeRaisesAnException ($scheme)
 
 withPathIsNotPrefixedWithSlashIfSetWithoutOne ()
 
 withPathNotSlashPrefixedIsEmittedWithSlashDelimiterWhenUriIsCastToString ()
 
 withQueryStripsQueryPrefixIfPresent ()
 
 withFragmentStripsFragmentPrefixIfPresent ()
 
 standardSchemePortCombinationsDataProvider ()
 
 getAuthorityOmitsPortForStandardSchemePortCombinations ($scheme, $port)
 
 getPathIsProperlyEncoded ()
 
 getPathDoesNotBecomeDoubleEncoded ()
 
 queryStringsForEncodingDataProvider ()
 
 getQueryIsProperlyEncoded ($query, $expected)
 
 getQueryIsNotDoubleEncoded ($query, $expected)
 
 getFragmentIsProperlyEncoded ()
 
 getFragmentIsNotDoubleEncoded ()
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, $methods=[], array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[])
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

Testcase for

Adapted from https://github.com/phly/http/

Definition at line 24 of file UriTest.php.

Member Function Documentation

◆ authorityInfoDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::authorityInfoDataProvider ( )
Returns
array

Definition at line 247 of file UriTest.php.

◆ canEmitOriginFormUrl()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::canEmitOriginFormUrl ( )
Test:

Definition at line 270 of file UriTest.php.

◆ canSerializeToString()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::canSerializeToString ( )
Test:

Definition at line 45 of file UriTest.php.

◆ constructorRaisesExceptionForNonStringURI()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::constructorRaisesExceptionForNonStringURI (   $uri)

invalidConstructorUrisDataProvider

Definition at line 333 of file UriTest.php.

◆ constructorRaisesExceptionForSeriouslyMalformedURI()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::constructorRaisesExceptionForSeriouslyMalformedURI ( )
Test:

Definition at line 342 of file UriTest.php.

◆ constructorSetsAllProperties()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::constructorSetsAllProperties ( )
Test:

Definition at line 29 of file UriTest.php.

◆ constructWithUnsupportedSchemeRaisesAnException()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::constructWithUnsupportedSchemeRaisesAnException (   $scheme)

invalidSchemesDataProvider

Test:

Definition at line 376 of file UriTest.php.

◆ getAuthorityOmitsPortForStandardSchemePortCombinations()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getAuthorityOmitsPortForStandardSchemePortCombinations (   $scheme,
  $port 
)

standardSchemePortCombinationsDataProvider

Test:

Definition at line 448 of file UriTest.php.

◆ getAuthorityReturnsExpectedValues()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getAuthorityReturnsExpectedValues (   $url,
  $expected 
)

authorityInfoDataProvider

Test:

Definition at line 261 of file UriTest.php.

◆ getFragmentIsNotDoubleEncoded()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getFragmentIsNotDoubleEncoded ( )
Test:

Definition at line 524 of file UriTest.php.

◆ getFragmentIsProperlyEncoded()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getFragmentIsProperlyEncoded ( )
Test:

Definition at line 514 of file UriTest.php.

◆ getPathDoesNotBecomeDoubleEncoded()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getPathDoesNotBecomeDoubleEncoded ( )
Test:

Definition at line 470 of file UriTest.php.

◆ getPathIsProperlyEncoded()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getPathIsProperlyEncoded ( )
Test:

Definition at line 460 of file UriTest.php.

◆ getPathOnOriginFormRemainsAnEmptyPath()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getPathOnOriginFormRemainsAnEmptyPath ( )
Test:

Definition at line 299 of file UriTest.php.

◆ getQueryIsNotDoubleEncoded()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getQueryIsNotDoubleEncoded (   $query,
  $expected 
)

queryStringsForEncodingDataProvider

Test:

Definition at line 505 of file UriTest.php.

◆ getQueryIsProperlyEncoded()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::getQueryIsProperlyEncoded (   $query,
  $expected 
)

queryStringsForEncodingDataProvider

Test:

Definition at line 495 of file UriTest.php.

◆ invalidConstructorUrisDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::invalidConstructorUrisDataProvider ( )
Returns
array

Definition at line 317 of file UriTest.php.

◆ invalidPathsDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::invalidPathsDataProvider ( )
Returns
array

Definition at line 170 of file UriTest.php.

◆ invalidPortsDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::invalidPortsDataProvider ( )
Returns
array

Definition at line 130 of file UriTest.php.

◆ invalidQueryStringsDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::invalidQueryStringsDataProvider ( )
Returns
array

Definition at line 209 of file UriTest.php.

◆ invalidSchemesDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::invalidSchemesDataProvider ( )
Returns
array

Definition at line 361 of file UriTest.php.

◆ queryStringsForEncodingDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::queryStringsForEncodingDataProvider ( )
Returns
array

Definition at line 480 of file UriTest.php.

◆ settingEmptyPathOnAbsoluteUriReturnsAnEmptyPath()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::settingEmptyPathOnAbsoluteUriReturnsAnEmptyPath ( )
Test:

Definition at line 280 of file UriTest.php.

◆ standardSchemePortCombinationsDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::standardSchemePortCombinationsDataProvider ( )
Returns
array

Definition at line 436 of file UriTest.php.

◆ stringRepresentationOfAbsoluteUriWithNoPathSetsAnEmptyPath()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::stringRepresentationOfAbsoluteUriWithNoPathSetsAnEmptyPath ( )
Test:

Definition at line 290 of file UriTest.php.

◆ stringRepresentationOfOriginFormWithNoPathRetainsEmptyPath()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::stringRepresentationOfOriginFormWithNoPathRetainsEmptyPath ( )
Test:

Definition at line 308 of file UriTest.php.

◆ validPortsDataProvider()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::validPortsDataProvider ( )
Returns
array

Definition at line 103 of file UriTest.php.

◆ withFragmentReturnsNewInstanceWithProvidedFragment()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withFragmentReturnsNewInstanceWithProvidedFragment ( )
Test:

Definition at line 235 of file UriTest.php.

◆ withFragmentStripsFragmentPrefixIfPresent()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withFragmentStripsFragmentPrefixIfPresent ( )
Test:

Definition at line 426 of file UriTest.php.

◆ withHostReturnsNewInstanceWithProvidedHost()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withHostReturnsNewInstanceWithProvidedHost ( )
Test:

Definition at line 91 of file UriTest.php.

◆ withPathIsNotPrefixedWithSlashIfSetWithoutOne()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withPathIsNotPrefixedWithSlashIfSetWithoutOne ( )
Test:

Definition at line 396 of file UriTest.php.

◆ withPathNotSlashPrefixedIsEmittedWithSlashDelimiterWhenUriIsCastToString()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withPathNotSlashPrefixedIsEmittedWithSlashDelimiterWhenUriIsCastToString ( )
Test:

Definition at line 406 of file UriTest.php.

◆ withPathRaisesExceptionForInvalidPaths()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withPathRaisesExceptionForInvalidPaths (   $path)

invalidPathsDataProvider

Test:

Definition at line 187 of file UriTest.php.

◆ withPathReturnsNewInstanceWithProvidedPath()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withPathReturnsNewInstanceWithProvidedPath ( )
Test:

Definition at line 158 of file UriTest.php.

◆ withPortRaisesExceptionForInvalidPorts()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withPortRaisesExceptionForInvalidPorts (   $port)

invalidPortsDataProvider

Definition at line 148 of file UriTest.php.

◆ withPortReturnsNewInstanceWithProvidedPort()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withPortReturnsNewInstanceWithProvidedPort (   $port)

validPortsDataProvider

Test:

Definition at line 115 of file UriTest.php.

◆ withQueryRaisesExceptionForInvalidQueryStrings()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withQueryRaisesExceptionForInvalidQueryStrings (   $query)

invalidQueryStringsDataProvider

Test:

Definition at line 225 of file UriTest.php.

◆ withQueryReturnsNewInstanceWithProvidedQuery()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withQueryReturnsNewInstanceWithProvidedQuery ( )
Test:

Definition at line 197 of file UriTest.php.

◆ withQueryStripsQueryPrefixIfPresent()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withQueryStripsQueryPrefixIfPresent ( )
Test:

Definition at line 416 of file UriTest.php.

◆ withSchemeReturnsNewInstanceWithNewScheme()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withSchemeReturnsNewInstanceWithNewScheme ( )
Test:

Definition at line 55 of file UriTest.php.

◆ withSchemeStripsOffDelimiter()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withSchemeStripsOffDelimiter ( )
Test:

Definition at line 351 of file UriTest.php.

◆ withSchemeUsingUnsupportedSchemeRaisesAnException()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withSchemeUsingUnsupportedSchemeRaisesAnException (   $scheme)

invalidSchemesDataProvider

Test:

Definition at line 386 of file UriTest.php.

◆ withUserInfoReturnsNewInstanceWithProvidedUser()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withUserInfoReturnsNewInstanceWithProvidedUser ( )
Test:

Definition at line 67 of file UriTest.php.

◆ withUserInfoReturnsNewInstanceWithProvidedUserAndPassword()

TYPO3\CMS\Core\Tests\Unit\Http\UriTest::withUserInfoReturnsNewInstanceWithProvidedUserAndPassword ( )
Test:

Definition at line 79 of file UriTest.php.