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:
@@ -62,7 +62,7 @@ class JavascriptRenderer
|
||||
|
||||
protected $useRequireJs = false;
|
||||
|
||||
protected $hideEmptyTabs = false;
|
||||
protected $hideEmptyTabs = null;
|
||||
|
||||
protected $initialization;
|
||||
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user