1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-24 10:12:54 +02:00

Tweak default, add test

This commit is contained in:
Barry vd. Heuvel
2024-09-10 19:26:20 +02:00
parent 5e76d50854
commit 1fd699bc8d
2 changed files with 8 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ class JavascriptRenderer
protected $useRequireJs = false;
protected $hideEmptyTabs = false;
protected $hideEmptyTabs = null;
protected $initialization;

View File

@@ -147,6 +147,13 @@ class JavascriptRendererTest extends DebugBarTestCase
$this->assertStringStartsWith("<script type=\"text/javascript\" nonce=\"mynonce\">\nvar phpdebugbar = new PhpDebugBar.DebugBar();", $this->r->render());
}
public function testRenderConstructorWithEmptyTabsHidden()
{
$this->r->setInitialization(JavascriptRenderer::INITIALIZE_CONSTRUCTOR);
$this->r->setHideEmptyTabs(true);
$this->assertStringStartsWith("<script type=\"text/javascript\">\nvar phpdebugbar = new PhpDebugBar.DebugBar();\nphpdebugbar.setHideEmptyTabs(true);", $this->r->render());
}
public function testJQueryNoConflictAutoDisabling()
{
$this->assertTrue($this->r->isJqueryNoConflictEnabled());