From: Hypolite Petovan Date: Wed, 13 Mar 2019 04:40:54 +0000 (-0400) Subject: Prevent side effects with BBCode::convert in testAutoLinking() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c5073e2036d84e4394257dfbdd1cc48510b24aa0;p=friendica.git Prevent side effects with BBCode::convert in testAutoLinking() --- diff --git a/tests/src/Content/Text/BBCodeTest.php b/tests/src/Content/Text/BBCodeTest.php index fe37b91cd1..2f9a244ccc 100644 --- a/tests/src/Content/Text/BBCodeTest.php +++ b/tests/src/Content/Text/BBCodeTest.php @@ -116,12 +116,11 @@ class BBCodeTest extends MockedTest public function testAutoLinking($data, $assertHTML) { $output = BBCode::convert($data); + $assert = '' . $data . ''; if ($assertHTML) { - $assert = '' . $data . ''; + $this->assertEquals($assert, $output); } else { - $assert = $data; + $this->assertNotEquals($assert, $output); } - - $this->assertEquals($assert, $output); } }