public function testBuildFormSeveralChoices()
 {
     $pool = $this->getMockBuilder('Sonata\\FormatterBundle\\Formatter\\Pool')->disableOriginalConstructor()->getMock();
     $translator = $this->getMock('Symfony\\Component\\Translation\\TranslatorInterface');
     $configManager = $this->getMock('Ivory\\CKEditorBundle\\Model\\ConfigManagerInterface');
     $type = new FormatterType($pool, $translator, $configManager);
     $choiceFormBuilder = $this->getMock('Symfony\\Component\\Form\\FormBuilderInterface');
     $choiceFormBuilder->expects($this->once())->method('getOption')->with('choices')->will($this->returnValue(array('foo' => 'bar', 'foo2' => 'bar2')));
     $formBuilder = $this->getMock('Symfony\\Component\\Form\\FormBuilderInterface');
     $formBuilder->expects($this->exactly(2))->method('add');
     $formBuilder->expects($this->once())->method('get')->will($this->returnValue($choiceFormBuilder));
     $options = array('format_field' => 'format', 'source_field' => 'source', 'format_field_options' => array('property_path' => ''), 'source_field_options' => array('property_path' => ''), 'listener' => false);
     $type->buildForm($formBuilder, $options);
 }