ReasonPhraseLocationTest.php 922 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace GuzzleHttp\Tests\Command\Guzzle\ResponseLocation;
  3. use GuzzleHttp\Command\Guzzle\Parameter;
  4. use GuzzleHttp\Command\Guzzle\ResponseLocation\ReasonPhraseLocation;
  5. use GuzzleHttp\Command\Result;
  6. use GuzzleHttp\Psr7\Response;
  7. /**
  8. * @covers \GuzzleHttp\Command\Guzzle\ResponseLocation\ReasonPhraseLocation
  9. * @covers \GuzzleHttp\Command\Guzzle\ResponseLocation\AbstractLocation
  10. */
  11. class ReasonPhraseLocationTest extends \PHPUnit_Framework_TestCase
  12. {
  13. /**
  14. * @group ResponseLocation
  15. */
  16. public function testVisitsLocation()
  17. {
  18. $location = new ReasonPhraseLocation();
  19. $parameter = new Parameter([
  20. 'name' => 'val',
  21. 'filters' => ['strtolower']
  22. ]);
  23. $response = new Response(200);
  24. $result = new Result();
  25. $result = $location->visit($result, $response, $parameter);
  26. $this->assertEquals('ok', $result['val']);
  27. }
  28. }