// Create a mock object $mock = Mockery::mock('MyClass'); // Define the possible return values $mock->shouldReceive('myMethod')->andReturn(Mockery::anyOf('foo', 42)); // Test the method with the possible values $this->assertTrue($mock->myMethod() === 'foo' || $mock->myMethod() === 42);In this example, we are creating a mock object for the MyClass class, and we are defining its myMethod() method to return any of the values "foo" or 42. We are then testing the method to make sure that it returns one of these values. The anyOf() method is a part of the Mockery package library.