+// GetQRChannel gives a new channel of pairing items to the test.
+func (f *WhatsAppFake) GetQRChannel(ctx context.Context) (<-chan whatsmeow.QRChannelItem, error) {
+ items := make(chan whatsmeow.QRChannelItem, 8)
+ f.pairings <- items
+
+ return items, nil
+}
+
+// PairPhone keeps phone and returns whatsappTestCode.
+func (f *WhatsAppFake) PairPhone(ctx context.Context, phone string, showPushNotification bool, clientType whatsmeow.PairClientType, clientDisplayName string) (string, error) {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ f.phones = append(f.phones, phone)
+
+ return whatsappTestCode, nil
+}
+
+// Logout counts the logouts and returns logoutErr.
+func (f *WhatsAppFake) Logout(ctx context.Context) error {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ f.logouts++
+
+ return f.logoutErr
+}
+
+// Phones returns the phone numbers of the pairings.
+func (f *WhatsAppFake) Phones() []string {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ return append([]string{}, f.phones...)
+}
+
+// Logouts returns the number of logouts.
+func (f *WhatsAppFake) Logouts() int {
+ f.mutex.Lock()
+ defer f.mutex.Unlock()
+
+ return f.logouts
+}
+