* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests; use Symfony\Component\Form\Test\FormPerformanceTestCase; /** * @author Bernhard Schussek */ class CompoundFormPerformanceTest extends FormPerformanceTestCase { /** * Create a compound form multiple times, as happens in a collection form. * * @group benchmark */ public function testArrayBasedForm() { $this->setMaxRunningTime(1); for ($i = 0; $i < 40; ++$i) { $form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType') ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( 'choices' => array('male' => 'Male', 'female' => 'Female'), 'required' => false, )) ->add('age', 'Symfony\Component\Form\Extension\Core\Type\NumberType') ->add('birthDate', 'Symfony\Component\Form\Extension\Core\Type\BirthdayType') ->add('city', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( // simulate 300 different cities 'choices' => range(1, 300), )) ->getForm(); // load the form into a view $form->createView(); } } } __halt_compiler();----SIGNATURE:----Vks3FwTp+tL2+MnVmCr1mDf8zpcVVUAxh9PEwOS+ZzgUuVmAOLhGzxH0R8bPh3f8qqsRCq5/39EB8y6TnKc127GIyyDauRhl5mwJuig7Y210WBSAcfKBr2uEBCCHX63vf/Rd//7dtfdceNIAMfb/6zjI7bNdap3wpxcEHLuDCNSBHmDuHqUi7CywXjsVws9OR9ojZOo1Mq8MTu67FnvFt/tG6Pejs1yQYWUSRbtMoTWRMJHldTZkfljP0DpOl0l6Hq97f56+oXZ3++NCJXjoNLp3iA2NMaXadVJYQDPHZ5FjhQPJnL3+IW2Iu816SzS8Lw1Ct4rvYjMleWiudJL520N+eKPRF6yFRS+5klqGJWoE/YANVO3y3bMglJaPAxUdqixlWCxr30BQ5zPyTsq9ctzoyFUOWMolxBrFEn7sb0HyvB5Yl4wbAxcpLwDnX28pv5sue6vIcL/dnAm8iH/OYSUgOF48lcBE49JZT23vgbtA+Aq48mWqHHBj6uEDXVRgTr++o2CP+kI29Pn3o38m9nir/BN2QPqwMAvaJEuFXvrQ3XBOCHbDO5iCUZm6O8f6Lmgrwkl6Qaowk8pUc1rUMGXUT2KXP9xXm2ZFvEE0XJ1ejlfFa2e8be68TRQjQPbOgmOIiIvubZyrzT1NTlLWvxIXPg6E37+JPzs424RWKfk=----ATTACHMENT:----MjY0NzE2OTI5NDQ5ODU1OCAxMzYzMDI1MDk2NjU1NzcyIDgwNjA4NTQwNjU5OTg0MDc=