public function ClientTest::testUsesPostFilesUploadError in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/fabpot/goutte/Goutte/Tests/ClientTest.php \Goutte\Tests\ClientTest::testUsesPostFilesUploadError()
File
- vendor/
fabpot/ goutte/ Goutte/ Tests/ ClientTest.php, line 272
Class
- ClientTest
- Goutte Client Test.
Namespace
Goutte\TestsCode
public function testUsesPostFilesUploadError() {
$guzzle = $this
->getGuzzle();
$client = new Client();
$client
->setClient($guzzle);
$files = array(
'test' => array(
'name' => '',
'type' => '',
'tmp_name' => '',
'error' => 4,
'size' => 0,
),
);
$client
->request('POST', 'http://www.example.com/', array(), $files);
$request = end($this->history)['request'];
$stream = $request
->getBody();
$boundary = $stream
->getBoundary();
$this
->assertEquals("--{$boundary}--\r\n", $stream
->getContents());
}