Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
Add test for the custom href attribute
  • Loading branch information
Healyhatman authored Jul 9, 2021
1 parent 64f586e commit cbbea17
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/SortableLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ public function testCustomTitleWithHTML()
$this->assertSame('<a href="http://localhost?sort=column&direction=asc"><em>columnTitle</em></a><i class=""></i>', $link);
}



public function testCustomHrefAttribute()
{
$link = SortableLink::render(['column', 'ColumnTitle', ['a' => 'b'], ['c' => 'd', 'href' => 'http://localhost/custom-path']]);

$this->assertSame('<a href="http://localhost/custom-path?a=b&sort=column&direction=asc" c="d">ColumnTitle</a> <i class="fa fa-sort"></i>', $link);
}


public function testParseParameters()
{
$parameters = ['column'];
Expand Down

0 comments on commit cbbea17

Please sign in to comment.