Skip to content

Commit

Permalink
Use assert same instead of assert equals
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 24, 2024
1 parent a2c7879 commit 33ba914
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ public function testRouteReplacement()
{
$input = '<p><a href="hyde::route(\'home\')">Home</a></p>';
$expected = '<p><a href="home.html">Home</a></p>';
$this->assertEquals($expected, DynamicMarkdownLinkProcessor::postprocess($input));
$this->assertSame($expected, DynamicMarkdownLinkProcessor::postprocess($input));
}

public function testRelativeLinkReplacement()
{
$input = '<p><a href="hyde::relativeLink(\'about\')">About</a></p>';
$expected = '<p><a href="about">About</a></p>';
$this->assertEquals($expected, DynamicMarkdownLinkProcessor::postprocess($input));
$this->assertSame($expected, DynamicMarkdownLinkProcessor::postprocess($input));
}

public function testAssetReplacement()
{
$input = '<p><img src="hyde::asset(\'image.jpg\')" alt="Image" /></p>';
$expected = '<p><img src="media/image.jpg" alt="Image" /></p>';
$this->assertEquals($expected, DynamicMarkdownLinkProcessor::postprocess($input));
$this->assertSame($expected, DynamicMarkdownLinkProcessor::postprocess($input));
}

public function testMultipleReplacements()
Expand All @@ -66,12 +66,12 @@ public function testMultipleReplacements()
<img src="media/logo.png" alt="Logo" />
HTML;

$this->assertEquals($expected, DynamicMarkdownLinkProcessor::postprocess($input));
$this->assertSame($expected, DynamicMarkdownLinkProcessor::postprocess($input));
}

public function testNoReplacements()
{
$input = '<p>This is a regular <a href="https://example.com">link</a> with no Hyde syntax.</p>';
$this->assertEquals($input, DynamicMarkdownLinkProcessor::postprocess($input));
$this->assertSame($input, DynamicMarkdownLinkProcessor::postprocess($input));
}
}

0 comments on commit 33ba914

Please sign in to comment.