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