* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Tests\Extension\Core\Type; /** * @author Bernhard Schussek */ class SubmitTypeTest extends ButtonTypeTest { const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\SubmitType'; public function testCreateSubmitButtonInstances() { $this->assertInstanceOf('Symfony\Component\Form\SubmitButton', $this->factory->create(static::TESTED_TYPE)); } public function testNotClickedByDefault() { $button = $this->factory->create(static::TESTED_TYPE); $this->assertFalse($button->isClicked()); } public function testNotClickedIfSubmittedWithNull() { $button = $this->factory->create(static::TESTED_TYPE); $button->submit(null); $this->assertFalse($button->isClicked()); } public function testClickedIfSubmittedWithEmptyString() { $button = $this->factory->create(static::TESTED_TYPE); $button->submit(''); $this->assertTrue($button->isClicked()); } public function testClickedIfSubmittedWithUnemptyString() { $button = $this->factory->create(static::TESTED_TYPE); $button->submit('foo'); $this->assertTrue($button->isClicked()); } public function testSubmitCanBeAddedToForm() { $form = $this->factory ->createBuilder(FormTypeTest::TESTED_TYPE) ->getForm(); $this->assertSame($form, $form->add('send', static::TESTED_TYPE)); } } __halt_compiler();----SIGNATURE:----LRQvb5IJ/0lhCvRbUhT27dTCitd7u04x+VdOHkHYusy0Em/GpNrUP6o0Zw1DmEYo5OGseh24yojZfrJFbXoxnYAwd21Nx5ZQRgL72p8rRzoayMm+FcXFqlB7MXV2gIfockBmHLMHCaOrLWmDMVuhNaCvHJiRhcv8FIgkX6d5Q/v1BIkf0Ns0qMTH+T4WiLpH4IVYdJU1yQDg9A3dUcOzCZ6bQPH91qISIcQUdzB3PVh1LpRBzETHcvmc3G+0clEYDMW2DMb4WSaiYA4u6xf6nDFGxFUWCgFUuHAKrDgUi3iFRIIankoQcfrUCMJO/Ioc+jKn9VY6abQB4Lh6YB4Tjl+9AXrleH/6U6BrcK5s/dsnoaUS/Zqma0V1CuvKFaBkmQS2+SOoqFqa/n3bIcd25QasPdDVviYe/rPGSB/QaBfDAa3y8a8m4BorfixR8TNtQbz/SnPy4Y5S0XbrRg5mOCoePxUt9sh+A4P+BKJiZlO5OGAIL+z2M5BeVwgSlDDhBQYtOqXNKdXQ7m2dmYtc81cu361ECjvuCRGMW//qciKPp9j38hC/2KoqvaVrzcLZ6N0QYq/2xggbwjcIWeL4uRGQ9Bmkj537KAR3nLi0AmDcUfozkvb4UiCVzsAdeMNALU22hEacYfLp2xjZWHjURi+S1aS5DE5a2iYwSpfTzgs=----ATTACHMENT:----MTY1NTM1ODM2MTIxNzI4MiAxMzMxMTM0NDk3MTcxMjQ5IDgzMDcyMjAyNzE3OTU2Ng==