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\Extension\Core\View\ChoiceView
;
15 use Symfony\Component\Intl\Util\IntlTestHelper
;
17 class CurrencyTypeTest
extends TypeTestCase
19 protected function setUp()
21 IntlTestHelper
::requireIntl($this);
26 public function testCurrenciesAreSelectable()
28 $form = $this->factory
->create('currency');
29 $view = $form->createView();
30 $choices = $view->vars
['choices'];
32 $this->assertContains(new ChoiceView('EUR', 'EUR', 'Euro'), $choices, '', false, false);
33 $this->assertContains(new ChoiceView('USD', 'USD', 'US Dollar'), $choices, '', false, false);
34 $this->assertContains(new ChoiceView('SIT', 'SIT', 'Slovenian Tolar'), $choices, '', false, false);