Author: Vincent Composieux (vincent.composieux@gmail.com)
Inheritance: extends Symfony\Component\Form\AbstractType
Example #1
0
 public function testBuildForm()
 {
     $currencyManager = $this->getMock('Sonata\\Component\\Currency\\CurrencyManagerInterface');
     $type = new ApiBasketType('my.test.class', $currencyManager);
     $builder = $this->getMockBuilder('Symfony\\Component\\Form\\FormBuilder')->disableOriginalConstructor()->getMock();
     $builder->expects($this->once())->method('create')->will($this->returnSelf());
     $builder->expects($this->once())->method('addModelTransformer');
     $type->buildForm($builder, array());
 }