@@ -1111,6 +1111,20 @@ function createHttpBackendMock($delegate, $browser) {
11111111 * request is handled.
11121112 */
11131113
1114+ /**
1115+ * @ngdoc method
1116+ * @name angular.module.ngMock.$httpBackend#expectPATCH
1117+ * @methodOf angular.module.ngMock.$httpBackend
1118+ * @description
1119+ * Creates a new request expectation for PATCH requests. For more info see `expect()`.
1120+ *
1121+ * @param {string|RegExp } url HTTP url.
1122+ * @param {(string|RegExp)= } data HTTP request body.
1123+ * @param {Object= } headers HTTP headers.
1124+ * @returns {requestHandler } Returns an object with `respond` method that control how a matched
1125+ * request is handled.
1126+ */
1127+
11141128 /**
11151129 * @ngdoc method
11161130 * @name angular.module.ngMock.$httpBackend#expectJSONP
@@ -1220,7 +1234,7 @@ function createHttpBackendMock($delegate, $browser) {
12201234 }
12211235 } ) ;
12221236
1223- angular . forEach ( [ 'PUT' , 'POST' ] , function ( method ) {
1237+ angular . forEach ( [ 'PUT' , 'POST' , 'PATCH' ] , function ( method ) {
12241238 $httpBackend [ prefix + method ] = function ( url , data , headers ) {
12251239 return $httpBackend [ prefix ] ( method , url , data , headers )
12261240 }
@@ -1483,6 +1497,20 @@ angular.module('ngMockE2E', ['ng']).config(function($provide) {
14831497 * control how a matched request is handled.
14841498 */
14851499
1500+ /**
1501+ * @ngdoc method
1502+ * @name angular.module.ngMockE2E.$httpBackend#whenPATCH
1503+ * @methodOf angular.module.ngMockE2E.$httpBackend
1504+ * @description
1505+ * Creates a new backend definition for PATCH requests. For more info see `when()`.
1506+ *
1507+ * @param {string|RegExp } url HTTP url.
1508+ * @param {(string|RegExp)= } data HTTP request body.
1509+ * @param {(Object|function(Object))= } headers HTTP headers.
1510+ * @returns {requestHandler } Returns an object with `respond` and `passThrough` methods that
1511+ * control how a matched request is handled.
1512+ */
1513+
14861514/**
14871515 * @ngdoc method
14881516 * @name angular.module.ngMockE2E.$httpBackend#whenJSONP
0 commit comments