tests/UnitTests/POData/UriProcessor/UriProcessorTest.php
/**
     * Test request uri for row count ($count)     
     * $skiptoken is not applicable for $count request, as it requires
     * paging and paging is not applicable for $count request
     */
Test request uri for row count ($count)
$skiptoken is not applicable for $count request, as it requires
paging and paging is not applicable for $count request
Test request uri for row count ( $count ) $skiptoken is not applicable for $count request as it requires paging and paging is not applicable for $count request
public function testUriProcessorForCountRequest7()
    {
        $hostInfo = array(
            'AbsoluteRequestUri' => new Url('http://localhost:8083/NorthWindDataService.svc/Customers/$count'),
            'AbsoluteServiceUri' => new Url('http://localhost:8083/NorthWindDataService.svc'),
            'QueryString' => '$top=1&$skiptoken=\'ALFKI\',guid\'05b242e752eb46bd8f0e6568b72cd9a5\'',
            'DataServiceVersion' => new Version(2, 0),
            'MaxDataServiceVersion' => new Version(2, 0),
        );
        $host = new ServiceHostTestFake($hostInfo);
        $dataService = new NorthWindService2();
        $dataService->setHost($host);
        try {
            $dataService->handleRequest();
            $this->fail('An expected ODataException for applying $skiptoken on $count has not been thrown');
        } catch (ODataException $ex) {
            $this->assertStringStartsWith("Query option \$skiptoken cannot be applied to the requested resource", $ex->getMessage());
        }
    }
public function testUriProcessorForCountRequest7 ( ) { $ hostInfo = array ( 'AbsoluteRequestUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc/Customers/$count' ) , 'AbsoluteServiceUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc' ) , 'QueryString' => '$top=1&$skiptoken=\'ALFKI\',guid\'05b242e752eb46bd8f0e6568b72cd9a5\'' , 'DataServiceVersion' => new Version ( 2 , 0 ) , 'MaxDataServiceVersion' => new Version ( 2 , 0 ) , ) ; $ host = new ServiceHostTestFake ( $ hostInfo ) ; $ dataService = new NorthWindService2 ( ) ; $ dataService -> setHost ( $ host ) ; try { $ dataService -> handleRequest ( ) ; $ this -> fail ( 'An expected ODataException for applying $skiptoken on $count has not been thrown' ) ; } catch ( ODataException $ ex ) { $ this -> assertStringStartsWith ( " Query option  \$ skiptoken cannot be applied to the requested resource " , $ ex -> getMessage ( ) ) ; } }
Test request uri for row count ($count)
 $skiptoken is not applicable for $count request, as it requires
 paging and paging is not applicable for $count request
Test request uri for row count ( $count ) $skiptoken is not applicable for $count request as it requires paging and paging is not applicable for $count request