Updated shlink packages and installed shlink-config

This commit is contained in:
Alejandro Celaya
2020-03-14 19:24:21 +01:00
parent da858f0353
commit d32112fe7e
8 changed files with 25 additions and 13 deletions

View File

@@ -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;

View File

@@ -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
{

View File

@@ -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;
}
}