public function testGetResponseVersionConfigMaxVersion30RequestVersion30RequestMaxVersion30() { $requestVersion = "3.0"; $requestMaxVersion = "3.0"; $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 respects the max version $this->assertEquals(Version::v3(), $request->getResponseVersion()); $request->raiseResponseVersion(2, 0); //max is already 3, so this is allowed $this->assertEquals(Version::v3(), $request->getResponseVersion()); $request->raiseResponseVersion(3, 0); //max is already 3 ditto $this->assertEquals(Version::v3(), $request->getResponseVersion()); }