Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f3e172f

Browse filesBrowse files
webmozartfabpot
authored andcommitted
[Form] Improved test coverage of UrlType
1 parent 9a95f52 commit f3e172f
Copy full SHA for f3e172f

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/UrlTypeTest.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ public function testSubmitAddsNoDefaultProtocolIfEmpty()
4747
$this->assertSame('', $form->getViewData());
4848
}
4949

50+
public function testSubmitAddsNoDefaultProtocolIfNull()
51+
{
52+
$form = $this->factory->create('url', null, array(
53+
'default_protocol' => 'http',
54+
));
55+
56+
$form->submit(null);
57+
58+
$this->assertNull($form->getData());
59+
$this->assertSame('', $form->getViewData());
60+
}
61+
5062
public function testSubmitAddsNoDefaultProtocolIfSetToNull()
5163
{
5264
$form = $this->factory->create('url', null, array(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.