Update PHPUnit, configuration and tests

This commit is contained in:
2023-03-04 17:44:57 +02:00
parent 36b8a22ee7
commit 65245093ce
8 changed files with 50 additions and 57 deletions

View File

@@ -2,25 +2,17 @@
namespace ivuorinen\BBCode\Tests;
use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
class TestCase extends \Orchestra\Testbench\TestCase
{
use ArraySubsetAsserts;
protected function getPackageProviders($app)
protected function getPackageProviders($app): array
{
unset($app);
return ['ivuorinen\BBCode\BBCodeParserServiceProvider'];
}
/**
* @param string $pattern
* @return bool
*/
protected function assertRegexpIsValid($pattern = '')
protected function assertRegexpIsValid(string $pattern = ''): bool
{
if (@preg_match($pattern, null) === false) {
if (@preg_match($pattern, '') === false) {
return false;
}
return true;