Fix a lot of notices/warnings/deprecation notes in the test directory

This commit is contained in:
Philipp 2020-10-18 20:31:57 +02:00
parent efaec26b1d
commit d55ecb9288
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
77 changed files with 428 additions and 558 deletions

View file

@ -21,7 +21,9 @@
namespace Friendica\Test\src\Content\Text;
use Exception;
use Friendica\Content\Text\HTML;
use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Test\MockedTest;
use Friendica\Test\Util\AppMockTrait;
use Friendica\Test\Util\VFSTrait;
@ -61,9 +63,10 @@ class HTMLTest extends MockedTest
*
* @param string $input The Markdown text to test
* @param string $expected The expected HTML output
* @throws \Exception
*
* @throws Exception
*/
public function testToPlaintext($input, $expected)
public function testToPlaintext(string $input, string $expected)
{
$output = HTML::toPlaintext($input, 0);
@ -91,9 +94,10 @@ class HTMLTest extends MockedTest
*
* @param string $expectedBBCode Expected BBCode output
* @param string $html HTML text
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
*
* @throws InternalServerErrorException
*/
public function testToBBCode($expectedBBCode, $html)
public function testToBBCode(string $expectedBBCode, string $html)
{
$actual = HTML::toBBCode($html);