Skip to content

Commit 306c992

Browse files
committed
Fix tests with assertTag
assertTag is deprecated and throws an deprecated message, failing the tests. Replaced it with a simple Contains assertion.
1 parent 4a660ce commit 306c992

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/DebugBar/Tests/JavascriptRendererTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public function testAddAssets()
6969
$this->assertContains('/bar/foo.js', $js);
7070

7171
$html = $this->r->renderHead();
72-
$this->assertTag(array('tag' => 'script', 'attributes' => array('src' => '/foobar/foo.js')), $html);
72+
//$this->assertTag(array('tag' => 'script', 'attributes' => array('src' => '/foobar/foo.js')), $html);
73+
$this->assertContains('<script type="text/javascript" src="/foobar/foo.js"></script>', $html);
7374
}
7475

7576
public function testGetAssets()
@@ -88,7 +89,7 @@ public function testGetAssets()
8889
public function testRenderHead()
8990
{
9091
$html = $this->r->renderHead();
91-
$this->assertTag(array('tag' => 'script', 'attributes' => array('src' => '/burl/debugbar.js')), $html);
92+
$this->assertContains('<script type="text/javascript" src="/burl/debugbar.js"></script>', $html);
9293
$this->assertTrue(strpos($html, "jQuery.noConflict(true);") > -1);
9394

9495
$this->r->setEnableJqueryNoConflict(false);

0 commit comments

Comments
 (0)