This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component/Form/CheckboxFieldTest.php
2010-08-20 23:09:55 +02:00

20 lines
479 B
PHP

<?php
namespace Symfony\Tests\Component\Form;
use Symfony\Component\Form\CheckboxField;
class CheckboxFieldTest extends \PHPUnit_Framework_TestCase
{
public function testRender()
{
$field = new CheckboxField('name');
$field->setData(true);
$html = '<input id="name" name="name" checked="checked" type="checkbox" class="foobar" />';
$this->assertEquals($html, $field->render(array(
'class' => 'foobar',
)));
}
}