tests/UnitTests/POData/UriProcessor/RequestDescriptionResponseVersionTest.php
//at least till we get to 4.0
at least till we get to 4.0
at least till we get to 4 . 0
public function testGetResponseVersionConfigMaxVersion30RequestVersionNullRequestMaxVersionNull()
    {
        $requestVersion = null;
        $requestMaxVersion = null;
        $fakeConfigMaxVersion = Version::v3();
        Phockito::when($this->mockServiceConfiguration->getMaxDataServiceVersion())
            ->return($fakeConfigMaxVersion);
        $fakeURL = new Url("http://host/service.svc/Collection");
        $fakeSegments = array(
            new SegmentDescriptor(),
        );
        $request = new RequestDescription($fakeSegments, $fakeURL, $fakeConfigMaxVersion, $requestVersion, $requestMaxVersion);
        $this->assertEquals(Version::v3(), $request->getResponseVersion());
        $request->raiseResponseVersion(2, 0);
        $this->assertEquals(Version::v3(), $request->getResponseVersion());
        $request->raiseResponseVersion(3, 0);
        $this->assertEquals(Version::v3(), $request->getResponseVersion());
    }
public function testGetResponseVersionConfigMaxVersion30RequestVersionNullRequestMaxVersionNull ( ) { $ requestVersion = null ; $ requestMaxVersion = null ; $ fakeConfigMaxVersion = Version :: v3 ( ) ; Phockito :: when ( $ this -> mockServiceConfiguration -> getMaxDataServiceVersion ( ) ) -> return ( $ fakeConfigMaxVersion ) ; $ fakeURL = new Url ( " http://host/service.svc/Collection " ) ; $ fakeSegments = array ( new SegmentDescriptor ( ) , ) ; $ request = new RequestDescription ( $ fakeSegments , $ fakeURL , $ fakeConfigMaxVersion , $ requestVersion , $ requestMaxVersion ) ; $ this -> assertEquals ( Version :: v3 ( ) , $ request -> getResponseVersion ( ) ) ; $ request -> raiseResponseVersion ( 2 , 0 ) ; $ this -> assertEquals ( Version :: v3 ( ) , $ request -> getResponseVersion ( ) ) ; $ request -> raiseResponseVersion ( 3 , 0 ) ; $ this -> assertEquals ( Version :: v3 ( ) , $ request -> getResponseVersion ( ) ) ; }
at least till we get to 4.0
at least till we get to 4 . 0
//max is 3, because it's not specified so it's set to the max service level so this is allowed //ditto