tests/UnitTests/POData/UriProcessor/QueryProcessor/SkipTokenParser/SkipTokenParser2Test.php
/**
     * Test will null as resultSet and empty array as resultSet     
     */
Test will null as resultSet and empty array as resultSet
Test will null as resultSet and empty array as resultSet
public function testGetIndexOfFirstEntryInNextPage1()
    {
        $northWindMetadata = NorthWindMetadata::Create();
        $configuration = new ServiceConfiguration($northWindMetadata);
        $configuration->setEntitySetAccessRule('*', EntitySetRights::ALL);
        $providersWrapper = new ProvidersWrapper(
            $northWindMetadata, 
            $this->mockQueryProvider,
            $configuration
        );
        $resourceSetWrapper = $providersWrapper->resolveResourceSet('Orders');
        $resourceType = $resourceSetWrapper->getResourceType();
        $orderBy = 'OrderID';
        $internalOrderByInfo = OrderByParser::parseOrderByClause($resourceSetWrapper, $resourceType, $orderBy, $providersWrapper);
        $skipToken = "10365";
        $internalSkipTokenInfo = SkipTokenParser::parseSkipTokenClause($resourceType, $internalOrderByInfo, $skipToken);
        try {
            $internalSkipTokenInfo->getIndexOfFirstEntryInTheNextPage($m);
            $this->fail('An expected ODataException for non-array param type has not been thrown');
        } catch (\InvalidArgumentException $exception) {
            $this->assertStringStartsWith("The argument 'searchArray' should be an array to perfrom binary search", $exception->getMessage());
        }
    }
public function testGetIndexOfFirstEntryInNextPage1 ( ) { $ northWindMetadata = NorthWindMetadata :: Create ( ) ; $ configuration = new ServiceConfiguration ( $ northWindMetadata ) ; $ configuration -> setEntitySetAccessRule ( '*' , EntitySetRights :: ALL ) ; $ providersWrapper = new ProvidersWrapper ( $ northWindMetadata , $ this -> mockQueryProvider , $ configuration ) ; $ resourceSetWrapper = $ providersWrapper -> resolveResourceSet ( 'Orders' ) ; $ resourceType = $ resourceSetWrapper -> getResourceType ( ) ; $ orderBy = 'OrderID' ; $ internalOrderByInfo = OrderByParser :: parseOrderByClause ( $ resourceSetWrapper , $ resourceType , $ orderBy , $ providersWrapper ) ; $ skipToken = " 10365 " ; $ internalSkipTokenInfo = SkipTokenParser :: parseSkipTokenClause ( $ resourceType , $ internalOrderByInfo , $ skipToken ) ; try { $ internalSkipTokenInfo -> getIndexOfFirstEntryInTheNextPage ( $ m ) ; $ this -> fail ( 'An expected ODataException for non-array param type has not been thrown' ) ; } catch ( \ InvalidArgumentException $ exception ) { $ this -> assertStringStartsWith ( " The argument 'searchArray' should be an array to perfrom binary search " , $ exception -> getMessage ( ) ) ; } }
Test will null as resultSet and empty array as resultSet
Test will null as resultSet and empty array as resultSet
//IMetadataProvider implementation