public function testSetNumInstancesInvalidVersion() { $req = new SetNumInstancesRequest(); $resp = new ApplicationError(ErrorCode::INVALID_VERSION, 'invalid version'); $req->setInstances(3); $this->setExpectedException('\\google\\appengine\\api\\modules\\ModulesException'); $this->apiProxyMock->expectCall('modules', 'SetNumInstances', $req, $resp); ModulesService::setNumInstances(3); $this->apiProxyMock->verify(); }