4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Form\Tests\Extension\Core\Type
;
14 use Symfony\Component\Form\Test\FormPerformanceTestCase
;
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 class ChoiceTypePerformanceTest
extends FormPerformanceTestCase
22 * This test case is realistic in collection forms where each
23 * row contains the same choice field.
27 public function testSameChoiceFieldCreatedMultipleTimes()
29 $this->setMaxRunningTime(1);
30 $choices = range(1, 300);
32 for ($i = 0; $i < 100; ++
$i) {
33 $this->factory
->create('choice', rand(1, 400), array(
34 'choices' => $choices,