You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudreve/pkg/mocks/thumbmock/thumb.go

26 lines
548 B

package thumbmock
import (
"context"
"github.com/cloudreve/Cloudreve/v3/pkg/thumb"
"github.com/stretchr/testify/mock"
"io"
)
type GeneratorMock struct {
mock.Mock
}
func (g GeneratorMock) Generate(ctx context.Context, file io.Reader, src string, name string, options map[string]string) (*thumb.Result, error) {
res := g.Called(ctx, file, src, name, options)
return res.Get(0).(*thumb.Result), res.Error(1)
}
func (g GeneratorMock) Priority() int {
return 0
}
func (g GeneratorMock) EnableFlag() string {
return "thumb_vips_enabled"
}