SelectMultipleNamePluginTest.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Tests\Component\Form\Renderer\Plugin;
  11. use Symfony\Component\Form\Renderer\Plugin\SelectMultipleNamePlugin;
  12. class SelectMultipleNamePluginTest extends \PHPUnit_Framework_TestCase
  13. {
  14. protected function setUp()
  15. {
  16. $this->markTestSkipped('Move me to Type tests');
  17. }
  18. public function testSetUp()
  19. {
  20. $form = $this->getMock('Symfony\Tests\Component\Form\FormInterface');
  21. $renderer = $this->getMock('Symfony\Component\Form\Renderer\FormRendererInterface');
  22. $renderer->expects($this->once())
  23. ->method('getVar')
  24. ->with($this->equalTo('name'))
  25. ->will($this->returnValue('multiname'));
  26. $renderer->expects($this->once())
  27. ->method('setVar')
  28. ->with($this->equalTo('name'), $this->equalTo('multiname[]'));
  29. $plugin = new SelectMultipleNamePlugin();
  30. $plugin->setUp($form, $renderer);
  31. }
  32. }