* * 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:----KGfK73thd0K+nSj9iPISOB1PcoVAtGLCFIyAmV5W4NbUMG4J4GEM1T1fa4U2MNISoPxoHSmJ73uW4/6mfSuZdcOo/gXnUeBfRWoEGtHfEq7YCCCUcXtDPMvH1iaUb0HbJem6HRD3s7a3PTjz660qs710Mblb0Uzw+JaOhARHidKmCadRX6Wd2aJnMu3m52AAA6NI9pj+VrfNJGZuhQ5pJHE2GpKFWgzF05whFWiDEUSob4flVB5jdQDPullhW4lXDe+EpFwvyjRMe8RWro/3/FO3WYdoIQ1coKAViJGdtANJ1sk9egcMR1tkUDv5cqJiYL6uIfUNHpU2v2pOVOrFcqr1jEJr4hyigKqpEnN0aj8rLc04nixMPkm9WxiP2tDteCAqg/PQM8ZU683rIlzxggWbEhVHy0AxbgwK/JA26ngpHwuBefApJMzogcommPUcmlMFF6IVKlXF0HcmvNii/wvsf523xR2mlBd90CLc3O8gSIONnNSVVFtiZw+Wj4uhzc5QQ9jyP/CL8a+ozqS/XHqMJSssQt/CUhv5RG7/BgJl24tnAaMJYAZNGNcwvPNmbPCELhHefDjt8xInCIjY1a3djN0o6/9Pc4+KJhvK793we7sYOG/763E7kI9Q4twY/Omm4NblpH6flYxt519zXTJ72sXYMJG+fht0fKiuLZM=----ATTACHMENT:----NTc0Mjg0NjcxNTI3MTk4MSA0ODYzNzIzNTA2ODYyMTM0IDY1OTk0NDcxOTYxNDExNjE=