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 4293d40

Browse filesBrowse files
committed
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
2 parents 9a95f52 + f3e172f commit 4293d40
Copy full SHA for 4293d40

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.