This repository has been archived by the owner on Oct 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from kontenta/emptyadminlink
Don't print href if url is empty
- Loading branch information
Showing
3 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Kontenta\KontourSupport\Tests\Feature; | ||
|
||
use Kontenta\KontourSupport\RouteAdminLink; | ||
use Kontenta\KontourSupport\Tests\IntegrationTest; | ||
|
||
class RouteAdminLinkTest extends IntegrationTest | ||
{ | ||
public function test_url_is_null_when_route_does_not_exist() | ||
{ | ||
$link = new RouteAdminLink('not.existing', 'Hej', '"Hejsanhejsan"'); | ||
|
||
$this->assertNull($link->getUrl()); | ||
$this->assertEquals('<a title=""Hejsanhejsan"">Hej</a>', $link->toHtml()); | ||
} | ||
} |