Skip to content

Commit

Permalink
deprecate(testing): CronableAssertions::assertCronableRegistered(),…
Browse files Browse the repository at this point in the history
… please use `ScheduleAssertions::assertScheduled()` instead.
  • Loading branch information
LastDragon-ru committed Dec 20, 2023
1 parent 40fb8f6 commit 018e3c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/testing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@ These assertions can be used without Laravel at all (#4).

## Laravel

| Name | Description |
|-----------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| [`assertDatabaseQueryEquals()`](./src/Assertions/DatabaseAssertions.php) | Asserts that SQL Query equals SQL Query. |
| [`assertScoutQueryEquals()`](./src/Assertions/ScoutAssertions.php) | Asserts that Scout Query equals Scout Query. |
| [`assertCronableRegistered()`](./src/Assertions/Application/CronableAssertions.php#L30) | Asserts that [Cronable](../queue/README.md#cron-jobs) is registered. |
| [`assertQueryLogEquals()`](./src/Database/QueryLog/WithQueryLog.php) | Asserts that `QueryLog` equals `QueryLog`. |
| [`assertScheduled()`](./src/Assertions/Application/ScheduleAssertions.php) | Asserts that Schedule contains task. |
| Name | Description |
|----------------------------------------------------------------------------|----------------------------------------------------------------------|
| [`assertDatabaseQueryEquals()`](./src/Assertions/DatabaseAssertions.php) | Asserts that SQL Query equals SQL Query. |
| [`assertScoutQueryEquals()`](./src/Assertions/ScoutAssertions.php) | Asserts that Scout Query equals Scout Query. |
| [`assertQueryLogEquals()`](./src/Database/QueryLog/WithQueryLog.php) | Asserts that `QueryLog` equals `QueryLog`. |
| [`assertScheduled()`](./src/Assertions/Application/ScheduleAssertions.php) | Asserts that Schedule contains task. |

# Laravel Response Testing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
use function str_contains;

/**
* @deprecated 5.3.1 Please use {@link ScheduleAssertions} instead.
*
* @required {@link \Illuminate\Foundation\Testing\TestCase}
*
* @property-read Application $app
Expand All @@ -30,6 +32,8 @@ trait CronableAssertions {
/**
* Asserts that {@link \LastDragon_ru\LaraASP\Queue\Contracts\Cronable} is registered.
*
* @deprecated 5.3.1 Please use {@link ScheduleAssertions::assertScheduled()} instead.
*
* @param class-string<Cronable> $cronable
*/
protected function assertCronableRegistered(string $cronable, string $message = ''): void {
Expand All @@ -40,6 +44,8 @@ protected function assertCronableRegistered(string $cronable, string $message =
}

/**
* @deprecated 5.3.1
*
* @param ConfigurableQueueable|class-string<ConfigurableQueueable> $queueable
* @param array<string, mixed> $settings
*/
Expand All @@ -54,6 +60,8 @@ protected function setQueueableConfig(ConfigurableQueueable|string $queueable, a
}

/**
* @deprecated 5.3.1
*
* @param class-string<Cronable> $cronable
*/
protected function isCronableRegistered(string $cronable): bool {
Expand Down

0 comments on commit 018e3c1

Please sign in to comment.