Prevent side effects with BBCode::convert in testAutoLinking()
This commit is contained in:
parent
fedf29e023
commit
c5073e2036
|
@ -116,12 +116,11 @@ class BBCodeTest extends MockedTest
|
||||||
public function testAutoLinking($data, $assertHTML)
|
public function testAutoLinking($data, $assertHTML)
|
||||||
{
|
{
|
||||||
$output = BBCode::convert($data);
|
$output = BBCode::convert($data);
|
||||||
|
$assert = '<a href="' . $data . '" target="_blank">' . $data . '</a>';
|
||||||
if ($assertHTML) {
|
if ($assertHTML) {
|
||||||
$assert = '<a href="' . $data . '" target="_blank">' . $data . '</a>';
|
$this->assertEquals($assert, $output);
|
||||||
} else {
|
} else {
|
||||||
$assert = $data;
|
$this->assertNotEquals($assert, $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEquals($assert, $output);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user