spec/Anshar/Http/UriSpec.php
function it_replaces_authority_components_with_new_authority()
    {
        $new_authority = $this->withAuthority("corge:grault@quux.qux:9999");

        $new_authority->getAuthority()->shouldReturn("corge:grault@quux.qux:9999");
        $new_authority->getUserInfo()->shouldReturn("corge:grault");
        $new_authority->getHost()->shouldReturn("quux.qux");
        $new_authority->getPort()->shouldReturn(9999);
    }
function it_replaces_authority_components_with_new_authority()
    {
        $new_authority = $this->withAuthority("corge:grault@quux.qux:9999");

        $new_authority->getAuthority()->shouldReturn("corge:grault@quux.qux:9999");
        $new_authority->getUserInfo()->shouldReturn("corge:grault");
        $new_authority->getHost()->shouldReturn("quux.qux");
        $new_authority->getPort()->shouldReturn(9999);
    }
function it_replaces_authority_components_with_new_authority ( ) { $ new_authority = $ this -> withAuthority ( "corge:grault@quux.qux:9999" ) ; $ new_authority -> getAuthority ( ) -> shouldReturn ( "corge:grault@quux.qux:9999" ) ; $ new_authority -> getUserInfo ( ) -> shouldReturn ( "corge:grault" ) ; $ new_authority -> getHost ( ) -> shouldReturn ( "quux.qux" ) ; $ new_authority -> getPort ( ) -> shouldReturn ( 9999 ) ; }
Replacing the authority is equivalent to replacing or removing all authority components depending upon the
composition of the authority.
Replacing the authority is equivalent to replacing or removing all authority components depending upon the composition of the authority .