UriTest
extends TestCase
in package
Tags
Table of Contents
Methods
- addsSlashForRelativeUriStringWithHost() : void
- allowsForRelativeUri() : void
- authorityProvider() : array<string|int, mixed>
- authorityWithUserInfoOrPortButWithoutHost() : void
- In RFC 8986 the host is optional and the authority can only consist of the user info and port.
- canConstructFalseyUriParts() : void
- canParseFalseyUriParts() : void
- canTransformAndRetrievePartsIndividually() : void
- defaultReturnValuesOfGetters() : void
- fileSchemeWithEmptyHostReconstruction() : void
- filterHostIPv6() : void
- fromParts() : void
- getAuthority() : void
- If the port component is not set or is the standard port for the current scheme, it SHOULD NOT be included.
- getHost() : void
- The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
- getInvalidUris() : array<string|int, mixed>
- getValidUris() : array<string|int, mixed>
- hostInUriDefaultsToLocalhost() : void
- hostIsNormalizedToLowercase() : void
- hostProvider() : array<string|int, mixed>
- internationalizedDomainName() : void
- invalidUrisThrowException() : void
- IPv6Host() : void
- parsesProvidedUri() : void
- parseUriPortCanBeZero() : mixed
- parseUriPortCannotBeNegative() : void
- pathStartingWithTwoSlashes() : void
- portCanBeRemoved() : void
- portIsNullIfStandardPortForScheme() : void
- portIsReturnedIfSchemeUnknown() : void
- portMustBeValid() : void
- relativeUriWithPathBeginningWithColonSegmentIsInvalid() : void
- relativeUriWithPathHavingColonSegment() : void
- schemeIsNormalizedToLowercase() : void
- standardPortIsNullIfSchemeChanges() : void
- supportsUrlEncodedValues() : void
- uriComponentsEncodingProvider() : array<string|int, mixed>
- uriComponentsGetEncodedProperly() : void
- validUrisStayValid() : void
- withFragmentEncodesProperly() : void
- withPartSamePart() : void
- withPathEncodesProperly() : void
- withPortCannotBeNegative() : void
- withQueryEncodesProperly() : void
Methods
addsSlashForRelativeUriStringWithHost()
public
addsSlashForRelativeUriStringWithHost() : void
Attributes
- #[Test]
allowsForRelativeUri()
public
allowsForRelativeUri() : void
Attributes
- #[Test]
authorityProvider()
public
static authorityProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>authorityWithUserInfoOrPortButWithoutHost()
In RFC 8986 the host is optional and the authority can only consist of the user info and port.
public
authorityWithUserInfoOrPortButWithoutHost() : void
Attributes
- #[Test]
canConstructFalseyUriParts()
public
canConstructFalseyUriParts() : void
Attributes
- #[Test]
canParseFalseyUriParts()
public
canParseFalseyUriParts() : void
Attributes
- #[Test]
canTransformAndRetrievePartsIndividually()
public
canTransformAndRetrievePartsIndividually() : void
Attributes
- #[Test]
defaultReturnValuesOfGetters()
public
defaultReturnValuesOfGetters() : void
Attributes
- #[Test]
fileSchemeWithEmptyHostReconstruction()
public
fileSchemeWithEmptyHostReconstruction() : void
Attributes
- #[Test]
filterHostIPv6()
public
filterHostIPv6() : void
Attributes
- #[Test]
fromParts()
public
fromParts(string $input) : void
Parameters
- $input : string
Attributes
- #[DataProvider]
- 'getValidUris'
- #[Test]
getAuthority()
If the port component is not set or is the standard port for the current scheme, it SHOULD NOT be included.
public
getAuthority(string $scheme, string $user, string $pass, string $host, int|null $port, string $authority) : void
Parameters
- $scheme : string
- $user : string
- $pass : string
- $host : string
- $port : int|null
- $authority : string
Attributes
- #[DataProvider]
- 'authorityProvider'
- #[Test]
getHost()
The value returned MUST be normalized to lowercase, per RFC 3986 Section 3.2.2.
public
getHost(string $host, string $expected) : void
Parameters
- $host : string
- $expected : string
Attributes
- #[DataProvider]
- 'hostProvider'
- #[Test]
getInvalidUris()
public
static getInvalidUris() : array<string|int, mixed>
Return values
array<string|int, mixed>getValidUris()
public
static getValidUris() : array<string|int, mixed>
Return values
array<string|int, mixed>hostInUriDefaultsToLocalhost()
public
hostInUriDefaultsToLocalhost() : void
Attributes
- #[Test]
hostIsNormalizedToLowercase()
public
hostIsNormalizedToLowercase() : void
Attributes
- #[Test]
hostProvider()
public
static hostProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>internationalizedDomainName()
public
internationalizedDomainName() : void
Attributes
- #[Test]
invalidUrisThrowException()
public
invalidUrisThrowException(string $invalidUri) : void
Parameters
- $invalidUri : string
Attributes
- #[DataProvider]
- 'getInvalidUris'
- #[Test]
IPv6Host()
public
IPv6Host() : void
parsesProvidedUri()
public
parsesProvidedUri() : void
Attributes
- #[Test]
parseUriPortCanBeZero()
public
parseUriPortCanBeZero() : mixed
Attributes
- #[Test]
parseUriPortCannotBeNegative()
public
parseUriPortCannotBeNegative() : void
Attributes
- #[Test]
pathStartingWithTwoSlashes()
public
pathStartingWithTwoSlashes() : void
Attributes
- #[Test]
portCanBeRemoved()
public
portCanBeRemoved() : void
Attributes
- #[Test]
portIsNullIfStandardPortForScheme()
public
portIsNullIfStandardPortForScheme() : void
Attributes
- #[Test]
portIsReturnedIfSchemeUnknown()
public
portIsReturnedIfSchemeUnknown() : void
Attributes
- #[Test]
portMustBeValid()
public
portMustBeValid() : void
Attributes
- #[Test]
relativeUriWithPathBeginningWithColonSegmentIsInvalid()
public
relativeUriWithPathBeginningWithColonSegmentIsInvalid() : void
Attributes
- #[Test]
relativeUriWithPathHavingColonSegment()
public
relativeUriWithPathHavingColonSegment() : void
Attributes
- #[Test]
schemeIsNormalizedToLowercase()
public
schemeIsNormalizedToLowercase() : void
Attributes
- #[Test]
standardPortIsNullIfSchemeChanges()
public
standardPortIsNullIfSchemeChanges() : void
Attributes
- #[Test]
supportsUrlEncodedValues()
public
supportsUrlEncodedValues() : void
Attributes
- #[Test]
uriComponentsEncodingProvider()
public
static uriComponentsEncodingProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>uriComponentsGetEncodedProperly()
public
uriComponentsGetEncodedProperly(string $input, string $path, string $query, string $fragment, string $output) : void
Parameters
- $input : string
- $path : string
- $query : string
- $fragment : string
- $output : string
Attributes
- #[DataProvider]
- 'uriComponentsEncodingProvider'
- #[Test]
validUrisStayValid()
public
validUrisStayValid(string $input) : void
Parameters
- $input : string
Attributes
- #[DataProvider]
- 'getValidUris'
- #[Test]
withFragmentEncodesProperly()
public
withFragmentEncodesProperly() : void
Attributes
- #[Test]
withPartSamePart()
public
withPartSamePart() : void
Attributes
- #[Test]
withPathEncodesProperly()
public
withPathEncodesProperly() : void
Attributes
- #[Test]
withPortCannotBeNegative()
public
withPortCannotBeNegative() : void
Attributes
- #[Test]
withQueryEncodesProperly()
public
withQueryEncodesProperly() : void
Attributes
- #[Test]