A basic test suite demonstrating AMPHP library compatibility with TrueAsync PHP runtime.
This project contains a collection of basic tests that verify AMPHP's core features work with TrueAsync, including async/await patterns, concurrent execution, parallel processing, pipeline operations, and HTTP client functionality.
The test suite covers:
- Async/Await Operations - Basic async execution, concurrent task handling, nested async calls, error propagation
- Parallel Processing - Concurrent task execution, task cancellation mechanisms
- Pipeline Operations - Data streaming, pipeline transformations, error handling in pipelines
- HTTP Client - Concurrent HTTP requests, response handling, error management
- PHP 8.6 or higher
- Composer
Note: This code was tested on the TrueAsync PHP fiber-support branch
Clone the repository and install dependencies:
git clone https://github.com/true-async/amphp-tests.git
cd amphp-tests
composer installRun all test suites:
php run_tests.phpRun individual test files:
php tests/test_async.php
php tests/test_parallel.php
php tests/test_pipeline.php
php tests/test_http.phpThe main test runner executes all test suites and provides a summary of results with timing information.
tests/test_async.php- Async/await pattern teststests/test_parallel.php- Parallel processing teststests/test_pipeline.php- Pipeline and data streaming teststests/test_http.php- HTTP client functionality tests
Each test suite runs independently and reports individual test results.
amphp/amp^3.0 - Core async primitivesamphp/parallel^2.0 - Parallel processing utilitiesamphp/http-client^5.0 - HTTP client implementation
Contributions are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.