Skip to content

Commit

Permalink
[Form] Improved test coverage of UrlType
Browse files Browse the repository at this point in the history
  • Loading branch information
webmozart authored and fabpot committed Apr 9, 2014
1 parent 9a95f52 commit f3e172f
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 f3e172f

Please sign in to comment.