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 testServiceDispatchingUriRawUrlWithQueryParam()
	{
    	$_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('AROUT')?\$select=CompanyName";
    	$_SERVER[ODataConstants::HTTPREQUEST_QUERY_STRING]	= "\$select=CompanyName";
    	try {
			$exceptionThrown = false;
			$dispatcher = new dispatcher();
 	        $dispatcher->dispatch();
 	        $contents = ob_get_contents();
 	        ob_end_clean();
	        $this->assertContains("<id>http://localhost:8086/NorthWind.svc/Customers(CustomerID='AROUT')</id>",$contents);
    	} catch(\Exception $exception) {
    		if(ob_get_length())
    		{
    			ob_end_clean();
    		}	
    		$exceptionThrown = true;
    		$this->fail('With Query Params - An unexpected exception  has been thrown:'.$exception->getMessage());	
    	}
	}
function testServiceDispatchingUriRawUrlWithQueryParam ( ) { $ _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('AROUT')? \$ select=CompanyName " ; $ _SERVER [ ODataConstants :: HTTPREQUEST_QUERY_STRING ] = " \$ select=CompanyName " ; try { $ exceptionThrown = false ; $ dispatcher = new dispatcher ( ) ; $ dispatcher -> dispatch ( ) ; $ contents = ob_get_contents ( ) ; ob_end_clean ( ) ; $ this -> assertContains ( " <id>http://localhost:8086/NorthWind.svc/Customers(CustomerID='AROUT')</id> " , $ contents ) ; } catch ( \ Exception $ exception ) { if ( ob_get_length ( ) ) { ob_end_clean ( ) ; } $ exceptionThrown = true ; $ this -> fail ( 'With 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