namespace Symfony\Component\HttpKernel\Tests\Debug;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Debug\FileLinkFormatter;
class FileLinkFormatterTest extends TestCase
{ public function testWhenNoFileLinkFormatAndNoRequest() { $sut =
new FileLinkFormatter([]);
$this->
assertFalse($sut->
format('/kernel/root/src/my/very/best/file.php', 3
));
} public function testAfterUnserialize() { $ide =
$_ENV['SYMFONY_IDE'
] ??
$_SERVER['SYMFONY_IDE'
] ?? null;
$_ENV['SYMFONY_IDE'
] =
$_SERVER['SYMFONY_IDE'
] = null;
$sut =
unserialize(serialize(new FileLinkFormatter()));
$this->
assertSame('file:///kernel/root/src/my/very/best/file.php#L3',
$sut->
format('/kernel/root/src/my/very/best/file.php', 3
));