/** * @return CouponServiceInterface|Mockery\Mock */ public function getCouponService() { $coupon = $this->dummyData->getCoupon(); $couponService = $this->getMockeryMock(CouponServiceInterface::class); $couponService->shouldReceive('findOneById')->andReturn($coupon); $couponService->shouldReceive('getAllCoupons')->andReturn([$coupon]); return $couponService; }