laravel-actions icon indicating copy to clipboard operation
laravel-actions copied to clipboard

Idea: add shouldExpect() to an action mock

Open cyrillkalita opened this issue 11 months ago • 1 comments

@lorisleiva there is a static::shouldRun() method, which is a wrapper around static::mock()->shouldRecieve('handle')

Would you have any reservations to add shouldExpect().. something like:

    /**
     * @return Expectation|ExpectationInterface|ExpectsHigherOrderMessage
     */
    public static function shouldExpect()
    {
        return static::mock()->expects('handle');
    }

I like how expects allows you to both set expectations and evaluate it after..?

cyrillkalita avatar Mar 23 '24 17:03 cyrillkalita