StatusCodeLocationTest.php 850 B

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