use Prophecy\Argument; $userRepository = $this->prophesize(UserRepository::class); $userRepository->findById(Argument::any())->willReturn($user);
$mock = $this->prophesize(MyClass::class); $mock->myMethod(Argument::any())->shouldBeCalledTimes(2); $mock->myMethod('foo'); $mock->myMethod(42);In this example we're setting up a prophecy for a `MyClass` object and expecting the `myMethod` method to be called twice with any argument. Then we're calling the method twice with different arguments to verify that the prophecy has been fulfilled. Overall, Prophecy is a useful PHP library for creating test doubles and setting up expectations in an automated testing environment. Its `Argument::any()` method is a great tool for creating flexible and generic expectations that can help simplify your tests and make them more robust.