minor fix

This commit is contained in:
Nicolas Grekas 2017-02-18 18:54:03 +01:00
parent a4cbe5f9ab
commit bc34081d37
3 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection; namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

View File

@ -11,12 +11,12 @@
namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList; namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity; use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList; use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\Form\Extension\Core\View\ChoiceView; use Symfony\Component\Form\Extension\Core\View\ChoiceView;
use Doctrine\ORM\Tools\SchemaTool; use Doctrine\ORM\Tools\SchemaTool;

View File

@ -72,7 +72,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
$ids = range(1, 300); $ids = range(1, 300);
foreach ($ids as $id) { foreach ($ids as $id) {
$name = 65 + chr($id % 57); $name = 65 + (int) chr($id % 57);
$this->em->persist(new SingleIntIdEntity($id, $name)); $this->em->persist(new SingleIntIdEntity($id, $name));
} }
@ -90,7 +90,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
$this->setMaxRunningTime(1); $this->setMaxRunningTime(1);
for ($i = 0; $i < 40; ++$i) { for ($i = 0; $i < 40; ++$i) {
$form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( $form = $this->factory->create('entity', null, array(
'class' => self::ENTITY_CLASS, 'class' => self::ENTITY_CLASS,
)); ));
@ -108,7 +108,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
$this->setMaxRunningTime(1); $this->setMaxRunningTime(1);
for ($i = 0; $i < 40; ++$i) { for ($i = 0; $i < 40; ++$i) {
$form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( $form = $this->factory->create('entity', null, array(
'class' => self::ENTITY_CLASS, 'class' => self::ENTITY_CLASS,
'choices' => $choices, 'choices' => $choices,
)); ));
@ -127,7 +127,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
$this->setMaxRunningTime(1); $this->setMaxRunningTime(1);
for ($i = 0; $i < 40; ++$i) { for ($i = 0; $i < 40; ++$i) {
$form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( $form = $this->factory->create('entity', null, array(
'class' => self::ENTITY_CLASS, 'class' => self::ENTITY_CLASS,
'preferred_choices' => $choices, 'preferred_choices' => $choices,
)); ));