PsrHttpFactoryTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bridge\PsrHttpMessage\Tests\Factory;
  11. use Http\Factory\Diactoros\ResponseFactory;
  12. use Http\Factory\Diactoros\ServerRequestFactory;
  13. use Http\Factory\Diactoros\StreamFactory;
  14. use Http\Factory\Diactoros\UploadedFileFactory;
  15. use Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory;
  16. /**
  17. * @author Kévin Dunglas <dunglas@gmail.com>
  18. * @author Antonio J. García Lagar <aj@garcialagar.es>
  19. */
  20. class PsrHttpFactoryTest extends AbstractHttpMessageFactoryTest
  21. {
  22. protected function buildHttpMessageFactory()
  23. {
  24. if (!class_exists('Http\Factory\Diactoros\ServerRequestFactory')) {
  25. $this->markTestSkipped('HTTP Factory for Diactoros is not installed.');
  26. }
  27. return new PsrHttpFactory(
  28. new ServerRequestFactory(),
  29. new StreamFactory(),
  30. new UploadedFileFactory(),
  31. new ResponseFactory()
  32. );
  33. }
  34. }