@@ -1111,6 +1111,20 @@ function createHttpBackendMock($delegate, $browser) {
1111
1111
* request is handled.
1112
1112
*/
1113
1113
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
+
1114
1128
/**
1115
1129
* @ngdoc method
1116
1130
* @name angular.module.ngMock.$httpBackend#expectJSONP
@@ -1220,7 +1234,7 @@ function createHttpBackendMock($delegate, $browser) {
1220
1234
}
1221
1235
} ) ;
1222
1236
1223
- angular . forEach ( [ 'PUT' , 'POST' ] , function ( method ) {
1237
+ angular . forEach ( [ 'PUT' , 'POST' , 'PATCH' ] , function ( method ) {
1224
1238
$httpBackend [ prefix + method ] = function ( url , data , headers ) {
1225
1239
return $httpBackend [ prefix ] ( method , url , data , headers )
1226
1240
}
@@ -1483,6 +1497,20 @@ angular.module('ngMockE2E', ['ng']).config(function($provide) {
1483
1497
* control how a matched request is handled.
1484
1498
*/
1485
1499
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
+
1486
1514
/**
1487
1515
* @ngdoc method
1488
1516
* @name angular.module.ngMockE2E.$httpBackend#whenJSONP
0 commit comments