2020-08-18 05:51:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Psl\Tests\Env;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use Psl\Env;
|
2021-03-18 16:03:21 +01:00
|
|
|
use Psl\Filesystem;
|
2020-10-07 08:08:16 +02:00
|
|
|
|
|
|
|
final class CurrentExecTest extends TestCase
|
2020-08-18 05:51:44 +02:00
|
|
|
{
|
|
|
|
public function testCurrentExe(): void
|
|
|
|
{
|
2021-03-18 16:03:21 +01:00
|
|
|
$phpunit = __DIR__ . '/../../../vendor/bin/phpunit';
|
|
|
|
$phpunit = Filesystem\canonicalize($phpunit);
|
|
|
|
if (PHP_OS_FAMILY !== 'Windows' && Filesystem\is_symbolic_link($phpunit)) {
|
|
|
|
$phpunit = Filesystem\read_symbolic_link($phpunit);
|
|
|
|
}
|
2020-10-07 08:08:16 +02:00
|
|
|
|
2020-10-15 10:18:03 +02:00
|
|
|
static::assertSame($phpunit, Env\current_exec());
|
2020-08-18 05:51:44 +02:00
|
|
|
}
|
|
|
|
}
|