tests/UnitTests/POData/UriProcessor/UriProcessorTest.php
/**
     * If paging is enabled for a resource set, then the uri 
     * processor should generate orderinfo irrespective of
     * whether $top or $orderby is specified or not.
     * 
     * Request DataServiceVersion => 1.0
     * Request MaxDataServiceVersion => 1.0
     * 
     * This will fail as paging requires version 2.0 or above
     */
If paging is enabled for a resource set, then the uri
processor should generate orderinfo irrespective of
whether $top or $orderby is specified or not.



This will fail as paging requires version 2.0 or above
If paging is enabled for a resource set then the uri processor should generate orderinfo irrespective of whether $top or $orderby is specified or not . This will fail as paging requires version 2 . 0 or above
public function testUriProcessorForResourcePageInfo2()
    {
        $hostInfo = array(
            'AbsoluteRequestUri' => new Url('http://localhost:8083/NorthWindDataService.svc/Customers'),
            'AbsoluteServiceUri' => new Url('http://localhost:8083/NorthWindDataService.svc'),
            'QueryString' => null,
            'DataServiceVersion' => new Version(1, 0),
            'MaxDataServiceVersion' => new Version(1, 0),
        );
        $host = new ServiceHostTestFake($hostInfo);
        $dataService = new NorthWindService2();
        $dataService->setHost($host);
        try {
            $dataService->handleRequest();
            $this->fail('An expected ODataException due to capability negotiation has not been thrown (paged result but client\'s max supportedd version is 1.0)');
        } catch (ODataException $ex) {
            $this->assertStringStartsWith("Request version '1.0' is not supported for the request payload. The only supported version is '2.0'", $ex->getMessage());
        }
    }
public function testUriProcessorForResourcePageInfo2 ( ) { $ hostInfo = array ( 'AbsoluteRequestUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc/Customers' ) , 'AbsoluteServiceUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc' ) , 'QueryString' => null , 'DataServiceVersion' => new Version ( 1 , 0 ) , 'MaxDataServiceVersion' => new Version ( 1 , 0 ) , ) ; $ host = new ServiceHostTestFake ( $ hostInfo ) ; $ dataService = new NorthWindService2 ( ) ; $ dataService -> setHost ( $ host ) ; try { $ dataService -> handleRequest ( ) ; $ this -> fail ( 'An expected ODataException due to capability negotiation has not been thrown (paged result but client\'s max supportedd version is 1.0)' ) ; } catch ( ODataException $ ex ) { $ this -> assertStringStartsWith ( " Request version '1.0' is not supported for the request payload. The only supported version is '2.0' " , $ ex -> getMessage ( ) ) ; } }
If paging is enabled for a resource set, then the uri
 processor should generate orderinfo irrespective of
 whether $top or $orderby is specified or not.
If paging is enabled for a resource set then the uri processor should generate orderinfo irrespective of whether $top or $orderby is specified or not .
//Test for generation of orderinfo for resource set //with request DataServiceVersion 1.0