/**
  * @param array $arr
  * @return $this
  */
 public function setAllowedCurrencies($arr)
 {
     $this->allowedCurrencies = $arr;
     // @todo Has to be done twice in case allowed currencies changed since construction
     $oldVal = $this->fieldCurrency->dataValue();
     $this->fieldCurrency = $this->buildCurrencyField();
     $this->fieldCurrency->setValue($oldVal);
     return $this;
 }
 public function testGetSchemaState()
 {
     $field = new FormField('MyField');
     $field->setValue('My value');
     $schema = $field->getSchemaState();
     $this->assertEquals('My value', $schema['value']);
 }