Skip to content

Commit

Permalink
Added some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Jul 4, 2014
1 parent bbd4e7d commit cce3a88
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/EmbedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ public function testUrlDirectory()
$this->assertNull($url->getDirectory(3));
}

public function testUrlDomain()
{
$url = new Embed\Url('http://www.domain.com');

$this->assertEquals('domain', $url->getDomain());
$this->assertEquals('domain.com', $url->getDomain(1));

$url = new Embed\Url('http://www.domain.co.uk');

$this->assertEquals('domain', $url->getDomain());
$this->assertEquals('domain.co.uk', $url->getDomain(1));

$url = new Embed\Url('http://www.domain.com.au');

$this->assertEquals('domain', $url->getDomain());
$this->assertEquals('domain.com.au', $url->getDomain(1));
}

public function testRedirections()
{
$this->checkUrl(
Expand Down

0 comments on commit cce3a88

Please sign in to comment.