search

goog.testing.MethodMock

Provided By

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

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

Parameters
scope(Object|null)

The scope of the method to be mocked out.

functionNamestring

The name of the function we're going to mock.

opt_strictnessnumber=

One of goog.testing.Mock.LOOSE or goog.testing.Mock.STRICT. The default is STRICT.

Returns
goog.testing.MockInterface

The mocked method.

Functions

Interfaces