minor #10647 [Form] Improved test coverage of UrlType (webmozart)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10647).
Discussion
----------
[Form] Improved test coverage of UrlType
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
f3e172f
[Form] Improved test coverage of UrlType
This commit is contained in:
commit
4293d40fce
@ -47,6 +47,18 @@ class UrlTypeTest extends TypeTestCase
|
||||
$this->assertSame('', $form->getViewData());
|
||||
}
|
||||
|
||||
public function testSubmitAddsNoDefaultProtocolIfNull()
|
||||
{
|
||||
$form = $this->factory->create('url', null, array(
|
||||
'default_protocol' => 'http',
|
||||
));
|
||||
|
||||
$form->submit(null);
|
||||
|
||||
$this->assertNull($form->getData());
|
||||
$this->assertSame('', $form->getViewData());
|
||||
}
|
||||
|
||||
public function testSubmitAddsNoDefaultProtocolIfSetToNull()
|
||||
{
|
||||
$form = $this->factory->create('url', null, array(
|
||||
|
Reference in New Issue
Block a user