1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21:
<?php
namespace Guzzle\Tests\Service\Command\LocationVisitor\Request;
use Guzzle\Service\Command\LocationVisitor\Request\ResponseBodyVisitor as Visitor;
class ResponseBodyVisitorTest extends AbstractVisitorTestCase
{
public function testVisitsLocation()
{
$visitor = new Visitor();
$param = $this->getNestedCommand('response_body')->getParam('foo');
$visitor->visit($this->command, $this->request, $param, sys_get_temp_dir() . '/foo.txt');
$body = $this->readAttribute($this->request, 'responseBody');
$this->assertContains('/foo.txt', $body->getUri());
}
}