AspectMock is a PHP library that allows mocking of any method call, including static and private methods, without requiring code refactoring. It uses aspect-oriented programming to intercept method calls and return mock values. To use it, install via Composer, create a custom autoloader for tests, and define the class and methods to mock along with their return values. AspectMock makes it easy to mock code as written without dependency injection refactoring required by other mocking tools.