diff options
| author | Peter Bacon Darwin | 2014-02-06 13:33:42 +0000 | 
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:40 +0000 | 
| commit | 2e641ac49f121a6e2cc70bd3879930b44a8a7710 (patch) | |
| tree | 11d52a598b7de52f7c31a1cc4405cba53f0a46ea /src/ngMock/angular-mocks.js | |
| parent | 1ca22a3dc8a469dc81718e5f0ae28225a2b7f7b2 (diff) | |
| download | angular.js-2e641ac49f121a6e2cc70bd3879930b44a8a7710.tar.bz2 | |
docs(bike-shed-migration): convert doctype and names
Diffstat (limited to 'src/ngMock/angular-mocks.js')
| -rw-r--r-- | src/ngMock/angular-mocks.js | 169 | 
1 files changed, 69 insertions, 100 deletions
| diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index ba79fc88..1c276f29 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -1,7 +1,7 @@  'use strict';  /** - * @ngdoc overview + * @ngdoc object   * @name angular.mock   * @description   * @@ -12,7 +12,7 @@ angular.mock = {};  /**   * ! This is a private undocumented service !   * - * @name ngMock.$browser + * @name $browser   *   * @description   * This service is a mock implementation of {@link ng.$browser}. It provides fake @@ -70,8 +70,7 @@ angular.mock.$Browser = function() {    /** -   * @name ngMock.$browser#defer.now -   * @propertyOf ngMock.$browser +   * @name $browser#defer.now     *     * @description     * Current milliseconds mock time. @@ -96,8 +95,7 @@ angular.mock.$Browser = function() {    /** -   * @name ngMock.$browser#defer.flush -   * @methodOf ngMock.$browser +   * @name $browser#defer.flush     *     * @description     * Flushes all pending requests and executes the defer callbacks. @@ -128,8 +126,7 @@ angular.mock.$Browser = function() {  angular.mock.$Browser.prototype = {  /** -  * @name ngMock.$browser#poll -  * @methodOf ngMock.$browser +  * @name $browser#poll    *    * @description    * run all fns in pollFns @@ -180,8 +177,8 @@ angular.mock.$Browser.prototype = {  /** - * @ngdoc object - * @name ngMock.$exceptionHandlerProvider + * @ngdoc provider + * @name $exceptionHandlerProvider   *   * @description   * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors @@ -189,8 +186,8 @@ angular.mock.$Browser.prototype = {   */  /** - * @ngdoc object - * @name ngMock.$exceptionHandler + * @ngdoc service + * @name $exceptionHandler   *   * @description   * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed @@ -227,8 +224,7 @@ angular.mock.$ExceptionHandlerProvider = function() {    /**     * @ngdoc method -   * @name ngMock.$exceptionHandlerProvider#mode -   * @methodOf ngMock.$exceptionHandlerProvider +   * @name $exceptionHandlerProvider#mode     *     * @description     * Sets the logging mode. @@ -278,7 +274,7 @@ angular.mock.$ExceptionHandlerProvider = function() {  /**   * @ngdoc service - * @name ngMock.$log + * @name $log   *   * @description   * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays @@ -317,8 +313,7 @@ angular.mock.$LogProvider = function() {      /**       * @ngdoc method -     * @name ngMock.$log#reset -     * @methodOf ngMock.$log +     * @name $log#reset       *       * @description       * Reset all of the logging arrays to empty. @@ -326,8 +321,7 @@ angular.mock.$LogProvider = function() {      $log.reset = function () {        /**         * @ngdoc property -       * @name ngMock.$log#log.logs -       * @propertyOf ngMock.$log +       * @name $log#log.logs         *         * @description         * Array of messages logged using {@link ngMock.$log#log}. @@ -341,8 +335,7 @@ angular.mock.$LogProvider = function() {        $log.log.logs = [];        /**         * @ngdoc property -       * @name ngMock.$log#info.logs -       * @propertyOf ngMock.$log +       * @name $log#info.logs         *         * @description         * Array of messages logged using {@link ngMock.$log#info}. @@ -356,8 +349,7 @@ angular.mock.$LogProvider = function() {        $log.info.logs = [];        /**         * @ngdoc property -       * @name ngMock.$log#warn.logs -       * @propertyOf ngMock.$log +       * @name $log#warn.logs         *         * @description         * Array of messages logged using {@link ngMock.$log#warn}. @@ -371,8 +363,7 @@ angular.mock.$LogProvider = function() {        $log.warn.logs = [];        /**         * @ngdoc property -       * @name ngMock.$log#error.logs -       * @propertyOf ngMock.$log +       * @name $log#error.logs         *         * @description         * Array of messages logged using {@link ngMock.$log#error}. @@ -386,8 +377,7 @@ angular.mock.$LogProvider = function() {        $log.error.logs = [];          /**         * @ngdoc property -       * @name ngMock.$log#debug.logs -       * @propertyOf ngMock.$log +       * @name $log#debug.logs         *         * @description         * Array of messages logged using {@link ngMock.$log#debug}. @@ -403,8 +393,7 @@ angular.mock.$LogProvider = function() {      /**       * @ngdoc method -     * @name ngMock.$log#assertEmpty -     * @methodOf ngMock.$log +     * @name $log#assertEmpty       *       * @description       * Assert that the all of the logging methods have no logged messages. If messages present, an @@ -436,7 +425,7 @@ angular.mock.$LogProvider = function() {  /**   * @ngdoc service - * @name ngMock.$interval + * @name $interval   *   * @description   * Mock implementation of the $interval service. @@ -522,8 +511,7 @@ angular.mock.$IntervalProvider = function() {      /**       * @ngdoc method -     * @name ngMock.$interval#flush -     * @methodOf ngMock.$interval +     * @name $interval#flush       * @description       *       * Runs interval tasks scheduled to be run in the next `millis` milliseconds. @@ -594,7 +582,7 @@ function padNumber(num, digits, trim) {  /** - * @ngdoc object + * @ngdoc type   * @name angular.mock.TzDate   * @description   * @@ -871,8 +859,8 @@ angular.mock.dump = function(object) {  };  /** - * @ngdoc object - * @name ngMock.$httpBackend + * @ngdoc service + * @name $httpBackend   * @description   * Fake HTTP backend implementation suitable for unit testing applications that use the   * {@link ng.$http $http service}. @@ -1174,8 +1162,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#when -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#when     * @description     * Creates a new backend definition.     * @@ -1214,8 +1201,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#whenGET -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#whenGET     * @description     * Creates a new backend definition for GET requests. For more info see `when()`.     * @@ -1227,8 +1213,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#whenHEAD -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#whenHEAD     * @description     * Creates a new backend definition for HEAD requests. For more info see `when()`.     * @@ -1240,8 +1225,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#whenDELETE -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#whenDELETE     * @description     * Creates a new backend definition for DELETE requests. For more info see `when()`.     * @@ -1253,8 +1237,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#whenPOST -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#whenPOST     * @description     * Creates a new backend definition for POST requests. For more info see `when()`.     * @@ -1268,8 +1251,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#whenPUT -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#whenPUT     * @description     * Creates a new backend definition for PUT requests.  For more info see `when()`.     * @@ -1283,8 +1265,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#whenJSONP -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#whenJSONP     * @description     * Creates a new backend definition for JSONP requests. For more info see `when()`.     * @@ -1297,8 +1278,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expect -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expect     * @description     * Creates a new request expectation.     * @@ -1331,8 +1311,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectGET -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectGET     * @description     * Creates a new request expectation for GET requests. For more info see `expect()`.     * @@ -1344,8 +1323,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectHEAD -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectHEAD     * @description     * Creates a new request expectation for HEAD requests. For more info see `expect()`.     * @@ -1357,8 +1335,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectDELETE -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectDELETE     * @description     * Creates a new request expectation for DELETE requests. For more info see `expect()`.     * @@ -1370,8 +1347,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectPOST -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectPOST     * @description     * Creates a new request expectation for POST requests. For more info see `expect()`.     * @@ -1386,8 +1362,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectPUT -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectPUT     * @description     * Creates a new request expectation for PUT requests. For more info see `expect()`.     * @@ -1402,8 +1377,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectPATCH -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectPATCH     * @description     * Creates a new request expectation for PATCH requests. For more info see `expect()`.     * @@ -1418,8 +1392,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#expectJSONP -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#expectJSONP     * @description     * Creates a new request expectation for JSONP requests. For more info see `expect()`.     * @@ -1432,8 +1405,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#flush -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#flush     * @description     * Flushes all pending requests using the trained responses.     * @@ -1461,8 +1433,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#verifyNoOutstandingExpectation -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#verifyNoOutstandingExpectation     * @description     * Verifies that all of the requests defined via the `expect` api were made. If any of the     * requests were not made, verifyNoOutstandingExpectation throws an exception. @@ -1484,8 +1455,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#verifyNoOutstandingRequest -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#verifyNoOutstandingRequest     * @description     * Verifies that there are no outstanding requests that need to be flushed.     * @@ -1505,8 +1475,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$httpBackend#resetExpectations -   * @methodOf ngMock.$httpBackend +   * @name $httpBackend#resetExpectations     * @description     * Resets all request expectations, but preserves all backend definitions. Typically, you would     * call resetExpectations during a multiple-phase test when you want to reuse the same instance of @@ -1629,8 +1598,8 @@ function MockXhr() {  /** - * @ngdoc function - * @name ngMock.$timeout + * @ngdoc service + * @name $timeout   * @description   *   * This service is just a simple decorator for {@link ng.$timeout $timeout} service @@ -1641,8 +1610,7 @@ angular.mock.$TimeoutDecorator = function($delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$timeout#flush -   * @methodOf ngMock.$timeout +   * @name $timeout#flush     * @description     *     * Flushes the queue of pending tasks. @@ -1655,8 +1623,7 @@ angular.mock.$TimeoutDecorator = function($delegate, $browser) {    /**     * @ngdoc method -   * @name ngMock.$timeout#verifyNoPendingTasks -   * @methodOf ngMock.$timeout +   * @name $timeout#verifyNoPendingTasks     * @description     *     * Verifies that there are no pending tasks that need to be flushed. @@ -1690,7 +1657,7 @@ angular.mock.$RootElementProvider = function() {  };  /** - * @ngdoc overview + * @ngdoc module   * @name ngMock   * @description   * @@ -1717,8 +1684,9 @@ angular.module('ngMock', ['ng']).provider({  }]);  /** - * @ngdoc overview + * @ngdoc module   * @name ngMockE2E + * @module ngMockE2E   * @description   *   * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing. @@ -1730,8 +1698,9 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  }]);  /** - * @ngdoc object - * @name ngMockE2E.$httpBackend + * @ngdoc service + * @name $httpBackend + * @module ngMockE2E   * @description   * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of   * applications that use the {@link ng.$http $http service}. @@ -1779,8 +1748,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#when - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#when + * @module ngMockE2E   * @description   * Creates a new backend definition.   * @@ -1804,8 +1773,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenGET - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenGET + * @module ngMockE2E   * @description   * Creates a new backend definition for GET requests. For more info see `when()`.   * @@ -1817,8 +1786,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenHEAD - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenHEAD + * @module ngMockE2E   * @description   * Creates a new backend definition for HEAD requests. For more info see `when()`.   * @@ -1830,8 +1799,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenDELETE - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenDELETE + * @module ngMockE2E   * @description   * Creates a new backend definition for DELETE requests. For more info see `when()`.   * @@ -1843,8 +1812,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenPOST - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenPOST + * @module ngMockE2E   * @description   * Creates a new backend definition for POST requests. For more info see `when()`.   * @@ -1857,8 +1826,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenPUT - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenPUT + * @module ngMockE2E   * @description   * Creates a new backend definition for PUT requests.  For more info see `when()`.   * @@ -1871,8 +1840,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenPATCH - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenPATCH + * @module ngMockE2E   * @description   * Creates a new backend definition for PATCH requests.  For more info see `when()`.   * @@ -1885,8 +1854,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {  /**   * @ngdoc method - * @name ngMockE2E.$httpBackend#whenJSONP - * @methodOf ngMockE2E.$httpBackend + * @name $httpBackend#whenJSONP + * @module ngMockE2E   * @description   * Creates a new backend definition for JSONP requests. For more info see `when()`.   * @@ -2003,7 +1972,7 @@ if(window.jasmine || window.mocha) {     * *NOTE*: This function is also published on window for easy access.<br>     *     * The inject function wraps a function into an injectable function. The inject() creates new -   * instance of {@link AUTO.$injector $injector} per test, which is then used for +   * instance of {@link auto.$injector $injector} per test, which is then used for     * resolving references.     *     * | 
