$mock = Mockery::mock('MyClass');
$mock = Mockery::mock('MyClass') ->shouldReceive('myMethod') ->once() ->andReturn('result');
$dependency = Mockery::mock('MyDependency'); $mock = Mockery::mock('MyClass', [$dependency]);This example creates a mock object for the `MyClass` class and injects a mock object for the `MyDependency` class. Overall, Mockery is a powerful tool for creating mock objects and simplifying the process of testing PHP code. It is available as a package on Packagist (https://packagist.org/packages/mockery/mockery).