You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
850 B
27 lines
850 B
<?php
|
|
namespace GuzzleHttp\Tests\Command\Guzzle\ResponseLocation;
|
|
|
|
use GuzzleHttp\Command\Guzzle\Parameter;
|
|
use GuzzleHttp\Command\Guzzle\ResponseLocation\StatusCodeLocation;
|
|
use GuzzleHttp\Command\Result;
|
|
use GuzzleHttp\Psr7\Response;
|
|
|
|
/**
|
|
* @covers \GuzzleHttp\Command\Guzzle\ResponseLocation\StatusCodeLocation
|
|
* @covers \GuzzleHttp\Command\Guzzle\ResponseLocation\AbstractLocation
|
|
*/
|
|
class StatusCodeLocationTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @group ResponseLocation
|
|
*/
|
|
public function testVisitsLocation()
|
|
{
|
|
$location = new StatusCodeLocation();
|
|
$parameter = new Parameter(['name' => 'val']);
|
|
$response = new Response(200);
|
|
$result = new Result();
|
|
$result = $location->visit($result, $response, $parameter);
|
|
$this->assertEquals(200, $result['val']);
|
|
}
|
|
}
|
|
|