mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-05-25 01:04:12 +02:00
17 lines
290 B
Go
17 lines
290 B
Go
package filemock
|
|
|
|
import (
|
|
"io/fs"
|
|
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
type Writer struct {
|
|
mock.Mock
|
|
}
|
|
|
|
func (m *Writer) Write(filepath string, data []byte, flag int, perm fs.FileMode) (int, error) {
|
|
args := m.Called(filepath, data, flag, perm)
|
|
return args.Int(0), args.Error(1)
|
|
}
|