From b4b5408fdce688b08fca2db48f6f40ab633bf10a Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Wed, 25 Jul 2012 22:16:38 +0200 Subject: [PATCH] [Form] Fixed failing tests --- .../Tests/Form/ChoiceList/EntityChoiceListTest.php | 10 +++++----- .../Tests/Form/ChoiceList/ModelChoiceListTest.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php index 2d8aeed2f3..5d9c747c6e 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php @@ -186,8 +186,8 @@ class EntityChoiceListTest extends DoctrineOrmTestCase $this->assertSame(array(1 => $entity1, 2 => $entity2), $choiceList->getChoices()); $this->assertEquals(array( - 'group1' => array(1 => new ChoiceView('1', 'Foo')), - 'group2' => array(2 => new ChoiceView('2', 'Bar')) + 'group1' => array(1 => new ChoiceView($entity1, '1', 'Foo')), + 'group2' => array(2 => new ChoiceView($entity2, '2', 'Bar')) ), $choiceList->getRemainingViews()); } @@ -219,9 +219,9 @@ class EntityChoiceListTest extends DoctrineOrmTestCase $this->assertEquals(array(1 => $item1, 2 => $item2, 3 => $item3, 4 => $item4), $choiceList->getChoices()); $this->assertEquals(array( - 'Group1' => array(1 => new ChoiceView('1', 'Foo'), 2 => new ChoiceView('2', 'Bar')), - 'Group2' => array(3 => new ChoiceView('3', 'Baz')), - 4 => new ChoiceView('4', 'Boo!') + 'Group1' => array(1 => new ChoiceView($item1, '1', 'Foo'), 2 => new ChoiceView($item2, '2', 'Bar')), + 'Group2' => array(3 => new ChoiceView($item3, '3', 'Baz')), + 4 => new ChoiceView($item4, '4', 'Boo!') ), $choiceList->getRemainingViews()); } diff --git a/src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php b/src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php index 4ff29fbe89..68f690db95 100644 --- a/src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php +++ b/src/Symfony/Bridge/Propel1/Tests/Form/ChoiceList/ModelChoiceListTest.php @@ -86,8 +86,8 @@ class ModelChoiceListTest extends Propel1TestCase $this->assertSame(array(1 => $item1, 2 => $item2), $choiceList->getChoices()); $this->assertEquals(array( - 'group1' => array(1 => new ChoiceView('1', 'Foo')), - 'group2' => array(2 => new ChoiceView('2', 'Bar')) + 'group1' => array(1 => new ChoiceView($item1, '1', 'Foo')), + 'group2' => array(2 => new ChoiceView($item2, '2', 'Bar')) ), $choiceList->getRemainingViews()); } @@ -113,9 +113,9 @@ class ModelChoiceListTest extends Propel1TestCase $this->assertEquals(array(1 => $item1, 2 => $item2, 3 => $item3, 4 => $item4), $choiceList->getChoices()); $this->assertEquals(array( - 'Group1' => array(1 => new ChoiceView('1', 'Foo'), 2 => new ChoiceView('2', 'Bar')), - 'Group2' => array(3 => new ChoiceView('3', 'Baz')), - 4 => new ChoiceView('4', 'Boo!') + 'Group1' => array(1 => new ChoiceView($item1, '1', 'Foo'), 2 => new ChoiceView($item2, '2', 'Bar')), + 'Group2' => array(3 => new ChoiceView($item3, '3', 'Baz')), + 4 => new ChoiceView($item4, '4', 'Boo!') ), $choiceList->getRemainingViews()); }