tests/UnitTests/POData/UriProcessor/UriProcessorTest.php
/**
     * Test request uri for row count ($count)     
     * 
     * Suppose $top option is absent, still
     * RequestDescription::topCount will be set if the resource targeted by the
     * uri has paging enabled, if RequestDescription::topCount 
     * is set then internal orderby info will be generated. But if the request 
     * is for raw count for a resource collection then paging is not applicable
     * for that, so topCount will be null and internal orderby info will not be 
     * generated.
     */
Test request uri for row count ($count)

Suppose $top option is absent, still
RequestDescription::topCount will be set if the resource targeted by the
uri has paging enabled, if RequestDescription::topCount
is set then internal orderby info will be generated. But if the request
is for raw count for a resource collection then paging is not applicable
for that, so topCount will be null and internal orderby info will not be
generated.
Test request uri for row count ( $count ) Suppose $top option is absent still RequestDescription :: topCount will be set if the resource targeted by the uri has paging enabled if RequestDescription :: topCount is set then internal orderby info will be generated . But if the request is for raw count for a resource collection then paging is not applicable for that so topCount will be null and internal orderby info will not be generated .
public function testUriProcessorForCountRequest3()
    {
        $hostInfo = array(
            'AbsoluteRequestUri' => new Url('http://localhost:8083/NorthWindDataService.svc/Customers/$count'),
            'AbsoluteServiceUri' => new Url('http://localhost:8083/NorthWindDataService.svc'),
            'QueryString' => null,
            'DataServiceVersion' => new Version(2, 0),
            'MaxDataServiceVersion' => new Version(2, 0),
        );
        $host = new ServiceHostTestFake($hostInfo);
        $dataService = new NorthWindService2();
        $dataService->setHost($host);
        $uriProcessor = $dataService->handleRequest();
        $requestDescription = $uriProcessor->getRequest();
        $this->assertNotNull($requestDescription);
        $this->assertNull($requestDescription->getInternalOrderByInfo());
    }
public function testUriProcessorForCountRequest3 ( ) { $ hostInfo = array ( 'AbsoluteRequestUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc/Customers/$count' ) , 'AbsoluteServiceUri' => new Url ( 'http://localhost:8083/NorthWindDataService.svc' ) , 'QueryString' => null , 'DataServiceVersion' => new Version ( 2 , 0 ) , 'MaxDataServiceVersion' => new Version ( 2 , 0 ) , ) ; $ host = new ServiceHostTestFake ( $ hostInfo ) ; $ dataService = new NorthWindService2 ( ) ; $ dataService -> setHost ( $ host ) ; $ uriProcessor = $ dataService -> handleRequest ( ) ; $ requestDescription = $ uriProcessor -> getRequest ( ) ; $ this -> assertNotNull ( $ requestDescription ) ; $ this -> assertNull ( $ requestDescription -> getInternalOrderByInfo ( ) ) ; }
Test request uri for row count ($count)
Test request uri for row count ( $count )