The goog.testing.MethodMock Namespace

goog.testing.MethodMock(scope, functionName, opt_strictness)

Mocks an existing function. Creates a goog.testing.FunctionMock and registers it in the given scope with the name specified by functionName.

scope {Object}
The scope of the method to be mocked out.
functionName {string}
The name of the function we're going to mock.
opt_strictness {number=}
One of goog.testing.Mock.LOOSE or goog.testing.Mock.STRICT. The default is STRICT.
returns {goog.testing.MockInterface}
The mocked method.

.$tearDown()

Resets the global function that we mocked back to its original state. @this {goog.testing.MockInterface}