tests/IntegrationTests/POData/OperationContext/ServiceHostTest.php
/**
     * If RequestURI is proper URI and does not contain QueryParam then it will return proper o/p 
     */
If RequestURI is proper URI and does not contain QueryParam then it will return proper o/p
If RequestURI is proper URI and does not contain QueryParam then it will return proper o / p
function testServiceDispatchingUriRawUrlWithoutQueryParam()
	{
    	$_SERVER[ODataConstants::HTTPREQUEST_METHOD] 		= ODataConstants::HTTP_METHOD_GET;
    	$_SERVER[ODataConstants::HTTPREQUEST_PROTOCOL]		= ODataConstants::HTTPREQUEST_PROTOCOL_HTTP;
    	$_SERVER[HttpProcessUtility::headerToServerKey(ODataConstants::HTTPREQUEST_HEADER_HOST)]			= "localhost:8086";
    	$_SERVER[ODataConstants::HTTPREQUEST_URI]			= "/NorthWind.svc/Customers";
    	$_SERVER[ODataConstants::HTTPREQUEST_QUERY_STRING]	= null;
    	try {
			$exceptionThrown = false;
 	        $dispatcher = new Dispatcher();
 	        $dispatcher->dispatch();
 	        $contents = ob_get_contents();
 	        ob_end_clean();
 	        $this->assertContains("<feed xml:base=\"http://localhost:8086/NorthWind.svc",$contents);
 	        $this->assertContains("<id>http://localhost:8086/NorthWind.svc/Customers</id>",$contents);
 	        $absoluteUri = $dispatcher->getHost()->getAbsoluteRequestUriAsString();
 	        $this->assertEquals("http://localhost:8086/NorthWind.svc/Customers",$absoluteUri);
 	        $rawUrl = $dispatcher->getHost()->getWebOperationContext()->IncomingRequest()->getRawUrl();
 	        $this->assertEquals("http://localhost:8086/NorthWind.svc/Customers",$rawUrl);
    	} catch(\Exception $exception) {
    		if(ob_get_length())
    		{
    			ob_end_clean();
    		}	
    		$exceptionThrown = true;
    		$this->fail('Without Query Params - An unexpected exception  has been thrown:'.$exception->getMessage());
    	} 
	}
function testServiceDispatchingUriRawUrlWithoutQueryParam ( ) { $ _SERVER [ ODataConstants :: HTTPREQUEST_METHOD ] = ODataConstants :: HTTP_METHOD_GET ; $ _SERVER [ ODataConstants :: HTTPREQUEST_PROTOCOL ] = ODataConstants :: HTTPREQUEST_PROTOCOL_HTTP ; $ _SERVER [ HttpProcessUtility :: headerToServerKey ( ODataConstants :: HTTPREQUEST_HEADER_HOST ) ] = " localhost:8086 " ; $ _SERVER [ ODataConstants :: HTTPREQUEST_URI ] = " /NorthWind.svc/Customers " ; $ _SERVER [ ODataConstants :: HTTPREQUEST_QUERY_STRING ] = null ; try { $ exceptionThrown = false ; $ dispatcher = new Dispatcher ( ) ; $ dispatcher -> dispatch ( ) ; $ contents = ob_get_contents ( ) ; ob_end_clean ( ) ; $ this -> assertContains ( " <feed xml:base= \" http://localhost:8086/NorthWind.svc " , $ contents ) ; $ this -> assertContains ( " <id>http://localhost:8086/NorthWind.svc/Customers</id> " , $ contents ) ; $ absoluteUri = $ dispatcher -> getHost ( ) -> getAbsoluteRequestUriAsString ( ) ; $ this -> assertEquals ( " http://localhost:8086/NorthWind.svc/Customers " , $ absoluteUri ) ; $ rawUrl = $ dispatcher -> getHost ( ) -> getWebOperationContext ( ) -> IncomingRequest ( ) -> getRawUrl ( ) ; $ this -> assertEquals ( " http://localhost:8086/NorthWind.svc/Customers " , $ rawUrl ) ; } catch ( \ Exception $ exception ) { if ( ob_get_length ( ) ) { ob_end_clean ( ) ; } $ exceptionThrown = true ; $ this -> fail ( 'Without Query Params - An unexpected exception  has been thrown:' . $ exception -> getMessage ( ) ) ; } }
If RequestURI is proper URI and does not contain QueryParam then it will return proper o/p
If RequestURI is proper URI and does not contain QueryParam then it will return proper o / p
//Service dispatched 	        