2020-08-18 05:51:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Psl\Tests\Env;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use Psl\Env;
|
|
|
|
use Psl\Str;
|
|
|
|
|
2020-10-15 10:18:03 +02:00
|
|
|
final class SplitPathsTest extends TestCase
|
2020-08-18 05:51:44 +02:00
|
|
|
{
|
|
|
|
public function testSplitPaths(): void
|
|
|
|
{
|
2020-10-15 10:18:03 +02:00
|
|
|
static::assertSame(['/home/azjezz', '/tmp'], Env\split_paths(Str\format('/home/azjezz%s/tmp', PATH_SEPARATOR)));
|
|
|
|
static::assertSame(['/home/azjezz', '/tmp'], Env\split_paths(Env\join_paths('/home/azjezz', '/tmp')));
|
|
|
|
static::assertSame(['/home/azjezz'], Env\split_paths('/home/azjezz'));
|
2020-08-18 05:51:44 +02:00
|
|
|
}
|
|
|
|
}
|