Skip to content

Commit

Permalink
test for javascript url
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolita Grazyte committed Mar 1, 2016
1 parent 5e342c8 commit 9c525c0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/Unit/UrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,21 @@ public function it_can_remove_the_fragment()
*/
public function it_can_determine_if_the_url_is_an_email_url()
{
$this->assertFalse(Url::create('https://spatie.be/')->isEmailUrl());
$this->assertFalse(Url::create('https://spa' .
'tie.be/')->isEmailUrl());
$this->assertTrue(Url::create('mailto:[email protected]')->isEmailUrl());
}

/**
* @test
*/
public function it_can_determine_if_the_url_is_javascript_url()
{
$url = (new Url('javascript:alert()'));
$this->assertTrue($url->isJavascript());
}


/**
* @test
*/
Expand Down

0 comments on commit 9c525c0

Please sign in to comment.