MaxLengthPluginTest.php 904 B

1234567891011121314151617181920212223242526272829303132
  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. public function testSetUp()
  15. {
  16. $field = $this->getMock('Symfony\Tests\Component\Form\FormInterface');
  17. $renderer = $this->getMock('Symfony\Component\Form\Renderer\FormRendererInterface');
  18. $renderer->expects($this->once())
  19. ->method('setVar')
  20. ->with($this->equalTo('max_length'), $this->equalTo(12));
  21. $plugin = new MaxLengthPlugin(12);
  22. $plugin->setUp($field, $renderer);
  23. }
  24. }