Skip to content

Commit

Permalink
StateBadgesTest: Account for change in visibility for createLink me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
raviks789 committed Oct 30, 2024
1 parent b5e7644 commit 4be5a02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/php/library/Icingadb/Common/StateBadgesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use ipl\Stdlib\Filter;
use ipl\Web\Filter\QueryString;
use ipl\Web\Url;
use ipl\Web\Widget\Link;
use PHPUnit\Framework\TestCase;

class StateBadgesTest extends TestCase
Expand All @@ -21,7 +22,7 @@ public function testCreateLinkRendersBaseFilterCorrectly()
Filter::equal('bar', 'foo')
));

$link = $stateBadges->createLink('test', Filter::equal('rab', 'oof'));
$link = $stateBadges->generateLink('test', Filter::equal('rab', 'oof'));

$this->assertSame(
'rab=oof&(foo=bar|bar=foo)',
Expand Down Expand Up @@ -81,6 +82,11 @@ protected function getStateInt(string $state): int
{
return 0;
}

public function generateLink($content, Filter\Rule $filter = null): Link
{
return parent::createLink($content, $filter);
}
};
}
}

0 comments on commit 4be5a02

Please sign in to comment.