1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-19 07:41:39 +02:00
Files
php-debugbar/tests/DebugBar/Tests/Browser/AbstractBrowserTest.php
Barry vd. Heuvel f9b5949093 Refactor browser test, test monolog bridge (#641)
* Refactor browser test, test monolog bridge

* Rename

* Add Doctrine
2024-03-31 20:14:48 +02:00

22 lines
632 B
PHP

<?php
namespace DebugBar\Tests\Browser;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\Panther\DomCrawler\Link;
use Symfony\Component\Panther\PantherTestCase;
abstract class AbstractBrowserTest extends PantherTestCase
{
public function isTabActive(Crawler $crawler, $tab)
{
$node = $crawler->filter('a.phpdebugbar-tab[data-collector="'.$tab.'"]');
return strpos($node->attr('class'), 'phpdebugbar-active') !== false;
}
public function getTabLink(Crawler $crawler, $tab): Link
{
return $crawler->filter('a.phpdebugbar-tab[data-collector="'.$tab.'"]')->link();
}
}