![]()
Resets the global function that we mocked back to its original state.
|
code » | ||||
Class used to mock a function. Useful for mocking closures and anonymous
callbacks etc. Creates a function object that extends goog.testing.Mock.
Arguments:
Returns: goog.testing.MockInterface
The mocked function.
|
code » | ||||
Mocks a global / top-level function. Creates a goog.testing.MethodMock
in the global scope with the name specified by functionName.
Arguments:
Returns: !goog.testing.MockInterface
The mocked global function.
|
code » | ||||
Mocks an existing function. Creates a goog.testing.FunctionMock
and registers it in the given scope with the name specified by functionName.
Arguments:
Returns: !goog.testing.MockInterface
The mocked method.
|
code » | ||||
![]()
Convenience method for creating a mock for a constructor. Copies class
members to the mock.
When mocking a constructor to return a mocked instance, remember to create the instance mock before mocking the constructor. If you mock the constructor first, then the mock framework will be unable to examine the prototype chain when creating the mock instance.
Arguments:
Returns: !goog.testing.MockInterface
The mocked constructor.
|
code » | ||||
Convenience method for creating a mock for a function.
Arguments:
Returns: goog.testing.MockInterface
The mocked function.
|
code » | ||||
Convenience method for creating a mocks for a global / top-level function.
Arguments:
Returns: goog.testing.MockInterface
The mocked global function.
|
code » | ||||
Convenience method for creating a mock for a method.
Arguments:
Returns: !goog.testing.MockInterface
The mocked global function.
|
code » | ||||
![]()
No description.
|
code » |