- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 0
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: WyriHaximus/php-async-test-utilities
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.2.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: WyriHaximus/php-async-test-utilities
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7.0.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 8 commits
- 9 files changed
- 1 contributor
Commits on Apr 23, 2023
-
Since all tests are executed inside a fiber, there is a default timeout of `30` seconds. To lower or raise that timeout this package comes with a `TimeOut` attribute. It can be set on the class and method level. When set on both the method level it takes priority over the class level. ```php <?php declare(strict_types=1); namespace WyriHaximus\Tests\AsyncTestUtilities; use React\EventLoop\Loop; use WyriHaximus\AsyncTestUtilities\AsyncTestCase; use WyriHaximus\AsyncTestUtilities\TimeOut; use function React\Async\async; use function React\Async\await; use function React\Promise\resolve; use function React\Promise\Timer\sleep; use function time; #[TimeOut(0.3)] final class AsyncTestCaseTest extends AsyncTestCase { #[TimeOut(1)] public function testAllTestsAreRanInAFiber(): void { self::expectOutputString('ab'); Loop::futureTick(async(static function (): void { echo 'a'; })); await(sleep(1)); echo 'b'; } public function testExpectCallableExactly(): void { $callable = $this->expectCallableExactly(3); Loop::futureTick($callable); Loop::futureTick($callable); Loop::futureTick($callable); } public function testExpectCallableOnce(): void { Loop::futureTick($this->expectCallableOnce()); } } ```
Configuration menu - View commit details
-
Copy full SHA for 5830b95 - Browse repository at this point
Copy the full SHA 5830b95View commit details -
Merge pull request #194 from WyriHaximus/fun-all-tests-in-a-fiber
Run all tests in a fiber
Configuration menu - View commit details
-
Copy full SHA for f19172b - Browse repository at this point
Copy the full SHA f19172bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 161d8f5 - Browse repository at this point
Copy the full SHA 161d8f5View commit details -
Merge pull request #195 from WyriHaximus/drop-deprecated-await-methods
Drop deprecated await functions
Configuration menu - View commit details
-
Copy full SHA for 18e28a0 - Browse repository at this point
Copy the full SHA 18e28a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02d6172 - Browse repository at this point
Copy the full SHA 02d6172View commit details -
Merge pull request #196 from WyriHaximus/Add-Deprecations-Label
Add Deprecations Label
Configuration menu - View commit details
-
Copy full SHA for 4b34d28 - Browse repository at this point
Copy the full SHA 4b34d28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bad002 - Browse repository at this point
Copy the full SHA 6bad002View commit details -
Merge pull request #197 from WyriHaximus/mark-expectCallable-methods-…
…deprecated Mark expectCallable* methods deprecated
Configuration menu - View commit details
-
Copy full SHA for 52647a9 - Browse repository at this point
Copy the full SHA 52647a9View commit details
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.