Skip to content
Permalink
Browse files

Write testAddMany() method for test addMany() method of Http/Client/F…

…ormData.php
  • Loading branch information...
sohelrana820 committed Mar 30, 2018
1 parent 8abe035 commit 539ad83c3d02fea6a5967b44f2d0a46e6bce0a3c
Showing with 16 additions and 0 deletions.
  1. +16 −0 tests/TestCase/Http/Client/FormDataTest.php
@@ -69,6 +69,22 @@ public function testAddSimple()
$this->assertEquals($expected, $result);
}
public function testAddMany()
{
$data = new FormData();
$array = [
'key' => 'value',
'empty' => '',
'int' => '1',
'float' => '2.3'
];
$data->addMany($array);
$this->assertCount(4, $data);
$result = (string)$data;
$expected = 'key=value&empty=&int=1&float=2.3';
$this->assertEquals($expected, $result);
}
/**
* Test adding a part object.
*

0 comments on commit 539ad83

Please sign in to comment.
You can’t perform that action at this time.