Skip to content

Commit

Permalink
minor #10647 [Form] Improved test coverage of UrlType (webmozart)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Apr 9, 2014
2 parents 9a95f52 + f3e172f commit 4293d40
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ public function testSubmitAddsNoDefaultProtocolIfEmpty()
$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(
Expand Down

0 comments on commit 4293d40

Please sign in to comment.