Skip to content

Commit 61c55e0

Browse files
committed
Mock idle by executing the callback on all the folders messages
1 parent f2c535e commit 61c55e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Testing/FakeFolder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ public function messages(): MessageQueryInterface
9191
*/
9292
public function idle(callable $callback, ?callable $query = null, int $timeout = 300): void
9393
{
94-
throw new Exception('Unsupported');
94+
foreach ($this->messages as $message) {
95+
$callback($message);
96+
}
9597
}
9698

9799
/**

0 commit comments

Comments
 (0)