Skip to content

Commit

Permalink
Trivial: more semantic assertions in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Feb 4, 2025
1 parent 429c14f commit 4c377c7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class GoogleTagManagerTest extends \PHPUnit\Framework\TestCase
public function testHeadCode(): void
{
$output = $this->renderGTMHeadCode('fakeContainerId');
$this->assertTrue(false !== strstr($output, 'gtm.js'));
$this->assertTrue(false !== strstr($output, 'fakeContainerId'));
$this->assertStringContainsString('gtm.js', $output);
$this->assertStringContainsString('fakeContainerId', $output);
}

/**
Expand All @@ -64,8 +64,8 @@ public function testHeadCode(): void
public function testBodyCode(): void
{
$output = $this->renderGTMBodyCode('fakeContainerId');
$this->assertTrue(false !== strstr($output, 'ns.html'));
$this->assertTrue(false !== strstr($output, 'fakeContainerId'));
$this->assertStringContainsString('ns.html', $output);
$this->assertStringContainsString('fakeContainerId', $output);
}

/**
Expand Down

0 comments on commit 4c377c7

Please sign in to comment.