RetryTraitTest
extends TestCase
in package
RetryTrait Test Class
Tags
Table of Contents
- backoffDataProvider() : array<string|int, mixed>
- Data provider for testBackoff
- testBackoff() : void
- Test the backoff duration handling
- testRetryableExceptionCallback() : void
- Test the trait with retryableExceptionCallback
- testRetryFail() : void
- Test the trait with a failing method
- testRetrySuccess() : void
- Test retry with an eventually successful method
- getMockRetryTestClass() : object
- Get a test harness for the trait.
Methods
backoffDataProvider()
Data provider for testBackoff
public
static backoffDataProvider() : array<string|int, mixed>
Return values
array<string|int, mixed> —testBackoff()
Test the backoff duration handling
public
testBackoff(int $expected, int $attempt[, array<string|int, mixed> $options = [] ]) : void
Parameters
- $expected : int
-
Expected result
- $attempt : int
-
Attempt number
- $options : array<string|int, mixed> = []
-
Current options
Tags
Return values
void —testRetryableExceptionCallback()
Test the trait with retryableExceptionCallback
public
testRetryableExceptionCallback() : void
Return values
void —testRetryFail()
Test the trait with a failing method
public
testRetryFail() : void
Return values
void —testRetrySuccess()
Test retry with an eventually successful method
public
testRetrySuccess() : void
Return values
void —getMockRetryTestClass()
Get a test harness for the trait.
protected
getMockRetryTestClass() : object