* * 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:----c47uU5sPXjMP215+i14KYAgL83sv2CjeF1QPlkERV6Z1BRC8CG8jVxIbkRs/B++ymIG1XeGYABNAlgS24jQd2er/8aZHcl/NYg33KJ/oPCDpg83q9+UuOl7iGs/xZvZLdrwB1N9miV3J9LGlEs5G+suX80K/v8XtDeZb7stwLHaXgqIh52p8O9/ZB4No/Z9+LerPSRJyJ8Choa+D6jPId1JfjZwTDE/aVuNt9baglfOzP7q9PADvdo38qENZoBxu6oqtyU4vcMP4A0b411CnB27joUtfJhsmggCHVJyKT0t3KEpaofDF1PAouUs7qFz+HHx5bfHonhlQ3+h9IwK+vzThjZ4MqrEpXJtMVLWv83v8YzWT09C6V2jv1v3K1lto59GPtiv1OU3q42u8PU/YW2ZTTn1UF91eoQ0ToIX+qVwq0UbCLu2oLk9Q4GGPg+/1QNYAhn2oTfRqlsKEQ6307vLGomCN0Rj0Vl7IAuWQmp9rKAYKPwmWcZPCP6b8URgiQvjTh/segpv3hf61/vmVBAub8PsInqNaw0O5NU+tYjRq42bhT+mZvcI9gn8qLuRF4XA2Fpl3m1ZSjKLumiYEtjo93a/i/LKD0msgBQj31VThygIrcSSDtA6xQwWGI4yzANHUOCb7Zfz2Dk//DJ+TVEzeB9jY5S0jKqPwII1ugCc=----ATTACHMENT:----Njc0NjEwMDAyNjc2ODM1NiA2MjU1NjEzNjMzNzM4MjEwIDE0MTYyMzA0MDU3MjYyNTc=