Prevent side effects with BBCode::convert in testAutoLinking()

pull/6857/head
Hypolite Petovan 2019-03-13 00:40:54 -04:00 committed by GitHub
parent fedf29e023
commit c5073e2036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -116,12 +116,11 @@ class BBCodeTest extends MockedTest
public function testAutoLinking($data, $assertHTML)
{
$output = BBCode::convert($data);
$assert = '<a href="' . $data . '" target="_blank">' . $data . '</a>';
if ($assertHTML) {
$assert = '<a href="' . $data . '" target="_blank">' . $data . '</a>';
$this->assertEquals($assert, $output);
} else {
$assert = $data;
$this->assertNotEquals($assert, $output);
}
$this->assertEquals($assert, $output);
}
}