public function doTestBuildForm(AbstractEnumType $type) { $builder = $this->getMock('Symfony\\Component\\Form\\Test\\FormBuilderInterface'); $builder->expects($this->at(0))->method('addEventListener')->with(FormEvents::PRE_SET_DATA, [$type, 'preSetData']); $type->buildForm($builder, []); }