HTTP 工厂单元测试
2.2.0
2024-06-10 13:00 UTC
Requires
- php: ^8.1
- phpunit/phpunit: ^10.0 || ^11.0
- psr/http-factory: ^1.0
README
要使用这些单元测试,您需要向 phpunit.xml 文件中添加一些配置。
<phpunit backupGlobals="true"> <testsuites> <testsuite name="Integration tests"> <directory>./vendor/http-interop/http-factory-tests/test</directory> </testsuite> </testsuites> <php> <!-- Fully qualified class names to your classes --> <const name="REQUEST_FACTORY" value="Acme\Factory\RequestFactory"/> <const name="RESPONSE_FACTORY" value="Acme\Factory\ResponseFactory"/> <const name="SERVER_REQUEST_FACTORY" value="Acme\Factory\ServerRequestFactory"/> <const name="STREAM_FACTORY" value="Acme\Factory\StreamFactory"/> <const name="UPLOADED_FILE_FACTORY" value="Acme\Factory\UploadedFileFactory"/> <const name="URI_FACTORY" value="Acme\Factory\UriFactory"/> </php> </phpunit>