$mockObject = $this->getMockBuilder(MyClass::class) ->setMethods(['method1', 'method2']) ->getMock(); // Make some method calls on the mock object $mockObject->method1('arg1'); $mockObject->method2('arg2'); echo $this->getMockObjectRenderer()->render($mockObject);The above example creates a new mock object for MyClass with the methods `method1` and `method2` mocked, then makes some calls to those methods. Finally, the render function is called on the mock object to display all method calls and arguments. This function belongs to the PHPUnit_Framework_MockObject package/library, which is a part of the PHPUnit testing framework for PHP. This package provides tools for creating test doubles (mock objects, stubs, etc.) and makes it easier to write unit tests that isolate small parts of your code.