添加网站文件
This commit is contained in:
26
vendor/guzzlehttp/guzzle-services/tests/RequestLocation/BodyLocationTest.php
vendored
Normal file
26
vendor/guzzlehttp/guzzle-services/tests/RequestLocation/BodyLocationTest.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Tests\Command\Guzzle\RequestLocation;
|
||||
|
||||
use GuzzleHttp\Command\Command;
|
||||
use GuzzleHttp\Command\Guzzle\Parameter;
|
||||
use GuzzleHttp\Command\Guzzle\RequestLocation\BodyLocation;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
|
||||
/**
|
||||
* @covers \GuzzleHttp\Command\Guzzle\RequestLocation\BodyLocation
|
||||
*/
|
||||
class BodyLocationTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @group RequestLocation
|
||||
*/
|
||||
public function testVisitsLocation()
|
||||
{
|
||||
$location = new BodyLocation('body');
|
||||
$command = new Command('foo', ['foo' => 'bar']);
|
||||
$request = new Request('POST', 'http://httbin.org');
|
||||
$param = new Parameter(['name' => 'foo']);
|
||||
$request = $location->visit($command, $request, $param);
|
||||
$this->assertEquals('foo=bar', $request->getBody()->getContents());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user