MaxLengthPluginTest.php 994 B

1234567891011121314151617181920212223242526272829303132333435
  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\MaxLengthPlugin;
  12. class MaxLengthPluginTest 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('setVar')
  24. ->with($this->equalTo('max_length'), $this->equalTo(12));
  25. $plugin = new MaxLengthPlugin(12);
  26. $plugin->setUp($form, $renderer);
  27. }
  28. }