Commit 67b49fdf authored by Bas de Nooijer's avatar Bas de Nooijer

Added test for bug with boolean values

parent ba0bcaec
...@@ -88,6 +88,17 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase ...@@ -88,6 +88,17 @@ class RequestBuilderTest extends \PHPUnit_Framework_TestCase
); );
} }
public function testBuildAddXmlWithBooleanValues()
{
$command = new AddCommand;
$command->addDocument(new Document(array('id' => 1, 'visible' => true, 'forsale' => false)));
$this->assertEquals(
'<add><doc><field name="id">1</field><field name="visible">true</field><field name="forsale">false</field></doc></add>',
$this->builder->buildAddXml($command)
);
}
public function testBuildAddXmlWithParams() public function testBuildAddXmlWithParams()
{ {
$command = new AddCommand(array('overwrite' => true, 'commitwithin' => 100)); $command = new AddCommand(array('overwrite' => true, 'commitwithin' => 100));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment