-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(testing)!: Removed deprecated `CronableAssertions::assertCro…
…nableRegistered()`, `CronableAssertions::setQueueableConfig()`, `CronableAssertions::isCronableRegistered()`.
- Loading branch information
1 parent
5612367
commit 11fe0a0
Showing
10 changed files
with
49 additions
and
88 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
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
26 changes: 26 additions & 0 deletions
26
packages/queue/src/Testing/Package/WithQueueableConfig.php
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,26 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace LastDragon_ru\LaraASP\Queue\Testing\Package; | ||
|
||
use LastDragon_ru\LaraASP\Core\Utils\ConfigMerger; | ||
use LastDragon_ru\LaraASP\Queue\Contracts\ConfigurableQueueable; | ||
|
||
use function config; | ||
use function is_object; | ||
use function sprintf; | ||
|
||
trait WithQueueableConfig { | ||
/** | ||
* @param ConfigurableQueueable|class-string<ConfigurableQueueable> $queueable | ||
* @param array<string, mixed> $settings | ||
*/ | ||
private function setQueueableConfig(ConfigurableQueueable|string $queueable, array $settings): void { | ||
$key = sprintf('queue.queueables.%s', is_object($queueable) ? $queueable::class : $queueable); | ||
$target = [ConfigMerger::Strict => false] + (array) config($key); | ||
$merger = new ConfigMerger(); | ||
|
||
config([ | ||
$key => $merger->merge($target, $settings), | ||
]); | ||
} | ||
} |
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
78 changes: 0 additions & 78 deletions
78
packages/testing/src/Assertions/Application/CronableAssertions.php
This file was deleted.
Oops, something went wrong.
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