404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.161.199: ~ $
<?php

declare(strict_types=1);

namespace Dotenv\Tests\Parser;

use Dotenv\Parser\Lines;
use Dotenv\Util\Regex;
use PHPUnit\Framework\TestCase;

final class LinesTest extends TestCase
{
    public function testProcessBasic()
    {
        $content = \file_get_contents(\dirname(\dirname(__DIR__)).'/fixtures/env/assertions.env');
        self::assertIsString($content);
        $result = Regex::split("/(\r\n|\n|\r)/", $content);
        self::assertTrue($result->success()->isDefined());

        $expected = [
            'ASSERTVAR1=val1',
            'ASSERTVAR2=""',
            'ASSERTVAR3="val3   "',
            'ASSERTVAR4="0" # empty looking value',
            'ASSERTVAR5="#foo"',
            "ASSERTVAR6=\"val1\nval2\"",
            "ASSERTVAR7=\"\nval3\" #",
            "ASSERTVAR8=\"val3\n\"",
            "ASSERTVAR9=\"\n\n\"",
        ];

        self::assertSame($expected, Lines::process($result->success()->get()));
    }

    public function testProcessQuotes()
    {
        $content = \file_get_contents(\dirname(\dirname(__DIR__)).'/fixtures/env/multiline.env');
        self::assertIsString($content);
        $result = Regex::split("/(\r\n|\n|\r)/", $content);
        self::assertTrue($result->success()->isDefined());

        $expected = [
            "TEST=\"test\n     test\\\"test\\\"\n     test\"",
            'TEST_ND="test\\ntest"',
            'TEST_NS=\'test\\ntest\'',
            'TEST_EQD="https://vision.googleapis.com/v1/images:annotate?key="',
            'TEST_EQS=\'https://vision.googleapis.com/v1/images:annotate?key=\'',
            "BASE64_ENCODED_MULTILINE=\"qS1zCzMVVUJWQShokv6YVYi+ruKSC/bHV7GmEiyVkLaBWJHNVHCHsgTksEBsy8wJ\nuwycAvR07ZyOJJed4XTRMKnKp1/v+6UATpWzkIjZXytK+pD+XlZimUHTx3uiDcmU\njhQX1wWSxHDqrSWxeIJiTD+BuUyId8FzmXQ3TcBydJ474tmOU2F492ubk3LAiZ18\nmhiRGoshXAOSbS/P3+RZi4bDeNE/No4=\"",
        ];

        self::assertSame($expected, Lines::process($result->success()->get()));
    }
}

Filemanager

Name Type Size Permission Actions
EntryParserTest.php File 7.69 KB 0644
LexerTest.php File 928 B 0644
LinesTest.php File 1.95 KB 0644
ParserTest.php File 3.08 KB 0644