-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reset message queues before scenario with zentruck/messenger-test
- Loading branch information
1 parent
ec8e8ef
commit a747b43
Showing
12 changed files
with
185 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ parameters: | |
excludes_analyse: | ||
paths: | ||
- src | ||
- tests/Unit | ||
level: 5 | ||
treatPhpDocTypesAsCertain: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Zenstruck\Messenger\Test\Bus; | ||
|
||
class TestBus | ||
{ | ||
public const ENABLE_MESSAGES_COLLECTION = 0x256; | ||
|
||
private static int $callStacks = 0x1; | ||
|
||
public static function enableMessagesCollection(): void | ||
{ | ||
self::$callStacks = self::$callStacks | self::ENABLE_MESSAGES_COLLECTION; | ||
} | ||
|
||
public static function getResult(): int | ||
{ | ||
return self::$callStacks; | ||
} | ||
|
||
public static function reset(): void | ||
{ | ||
self::$callStacks = 0x1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Zenstruck\Messenger\Test\Transport; | ||
|
||
class TestTransport | ||
{ | ||
public const RESET_ALL = 0x16; | ||
public const ENABLE_MESSAGES_COLLECTION = 0x256; | ||
public const DISABLE_RESET_ON_KERNEL_SHUTDOWN = 0x1024; | ||
private static int $callStacks = 0x1; | ||
|
||
public static function resetAll(): void | ||
{ | ||
self::$callStacks = self::$callStacks | self::RESET_ALL; | ||
} | ||
|
||
public static function enableMessagesCollection(): void | ||
{ | ||
self::$callStacks = self::$callStacks | self::ENABLE_MESSAGES_COLLECTION; | ||
} | ||
|
||
public static function disableResetOnKernelShutdown(): void | ||
{ | ||
self::$callStacks = self::$callStacks | self::DISABLE_RESET_ON_KERNEL_SHUTDOWN; | ||
} | ||
|
||
public static function getResult(): int | ||
{ | ||
return self::$callStacks; | ||
} | ||
|
||
public static function reset(): void | ||
{ | ||
self::$callStacks = 0x1; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters