Assign empty value for unset fields. Fix bug in test.

This commit is contained in:
2016-07-10 21:56:19 +02:00
parent ebc0c89fcc
commit 918026fca4
2 changed files with 8 additions and 3 deletions

View File

@ -34,7 +34,8 @@ class FieldDefinitionTest extends \PHPUnit_Framework_TestCase
public function testAddFieldValues()
{
$fdo = new FieldDefinition('hotel');
$fdo->addFieldValues(array('url'=>'http://example.org/'), array('USER_NAME'=>'John Doe'));
$fdo->addPlaceholder('USER_NAME', 'John Doe');
$fdo->addFieldValues(array('url'=>'http://example.org/'));
$fd = $fdo->getFieldData();
$this->assertArrayHasKey('fields', $fd);
$this->assertArrayHasKey('url', $fd['fields']);