Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow Better Testing of Properites #12

Open
JonPurvis opened this issue Sep 16, 2024 · 0 comments
Open

Allow Better Testing of Properites #12

JonPurvis opened this issue Sep 16, 2024 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JonPurvis
Copy link
Owner

JonPurvis commented Sep 16, 2024

At the moment, if you have a job and you specified the number of times it should be retried, you could test it like this:

test('job')
    ->expect('App\Jobs\TestJob')
    ->toBeTriedAgainOnFailure()

However, that merely checks that a $tries property exists on the class and that the value is above 1. I think it would be better if you could specify that number yourself:

test('job')
    ->expect('App\Jobs\TestJob')
    ->toBeTriedAgainOnFailure(maxTries: 5)

If you have a set number that each job should be retried across the application, then this test will help catch where someone has tried to increase it.

There's definitely some other expectations that this can be applied to and I think it will greatly enhance Lawman

@JonPurvis JonPurvis added the good first issue Good for newcomers label Sep 16, 2024
@JonPurvis JonPurvis added the help wanted Extra attention is needed label Feb 16, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant