Skip to content

Commit 836f2d1

Browse files
committed
fix tests.
1 parent d6f8c12 commit 836f2d1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

pkg/enqueue-bundle/Tests/Functional/App/AsyncListener.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class AsyncListener
1919
*/
2020
private $registry;
2121

22+
private $syncMode = [];
23+
2224
/**
2325
* @param ProducerInterface $producer
2426
* @param Registry $registry
@@ -29,6 +31,34 @@ public function __construct(ProducerInterface $producer, Registry $registry)
2931
$this->registry = $registry;
3032
}
3133

34+
public function __invoke(Event $event, $eventName)
35+
{
36+
$this->onEvent($event, $eventName);
37+
}
38+
39+
public function resetSyncMode()
40+
{
41+
$this->syncMode = [];
42+
}
43+
44+
/**
45+
* @param string $eventName
46+
*/
47+
public function syncMode($eventName)
48+
{
49+
$this->syncMode[$eventName] = true;
50+
}
51+
52+
/**
53+
* @param string $eventName
54+
*
55+
* @return bool
56+
*/
57+
public function isSyncMode($eventName)
58+
{
59+
return isset($this->syncMode[$eventName]);
60+
}
61+
3262
/**
3363
* @param Event $event
3464
* @param string $eventName

0 commit comments

Comments
 (0)