mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Updated shlink packages and installed shlink-config
This commit is contained in:
@@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace Shlinkio\Shlink\Core\Config;
|
||||
|
||||
use Laminas\Stdlib\ArrayUtils;
|
||||
use Shlinkio\Shlink\Installer\Util\PathCollection;
|
||||
use Shlinkio\Shlink\Config\Collection\PathCollection;
|
||||
|
||||
use function array_flip;
|
||||
use function array_intersect_key;
|
||||
|
||||
@@ -4,7 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core;
|
||||
|
||||
use function Shlinkio\Shlink\Common\loadConfigFromGlob;
|
||||
use function Shlinkio\Shlink\Config\loadConfigFromGlob;
|
||||
|
||||
class ConfigProvider
|
||||
{
|
||||
|
||||
@@ -5,16 +5,15 @@ declare(strict_types=1);
|
||||
namespace ShlinkioTest\Shlink\Core\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
|
||||
use Shlinkio\Shlink\Core\Model\Visitor;
|
||||
|
||||
use function random_int;
|
||||
use function str_repeat;
|
||||
use function strlen;
|
||||
use function substr;
|
||||
|
||||
class VisitorTest extends TestCase
|
||||
{
|
||||
use StringUtilsTrait;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @dataProvider provideParams
|
||||
@@ -60,4 +59,15 @@ class VisitorTest extends TestCase
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
private function generateRandomString(int $length): string
|
||||
{
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[random_int(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user