404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.147.140.217: ~ $
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Uid\Tests\Command;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Component\Uid\Command\InspectUlidCommand;

final class InspectUlidCommandTest extends TestCase
{
    public function test()
    {
        $commandTester = new CommandTester(new InspectUlidCommand());

        $this->assertSame(1, $commandTester->execute(['ulid' => 'foobar']));
        $this->assertStringContainsString('Invalid ULID: "foobar"', $commandTester->getDisplay());

        foreach ([
            '01E439TP9XJZ9RPFH3T1PYBCR8',
            '1BKocMc5BnrVcuq2ti4Eqm',
            '0171069d-593d-97d3-8b3e-23d06de5b308',
        ] as $ulid) {
            $this->assertSame(0, $commandTester->execute(['ulid' => $ulid]));
            $this->assertSame(<<<EOF
 ---------------------- -------------------------------------- 
  Label                  Value                                 
 ---------------------- -------------------------------------- 
  toBase32 (canonical)   01E439TP9XJZ9RPFH3T1PYBCR8            
  toBase58               1BKocMc5BnrVcuq2ti4Eqm                
  toRfc4122              0171069d-593d-97d3-8b3e-23d06de5b308  
  toHex                  0x0171069d593d97d38b3e23d06de5b308    
 ---------------------- -------------------------------------- 
  Time                   2020-03-23 08:58:27.517 UTC           
 ---------------------- -------------------------------------- 


EOF
                , $commandTester->getDisplay(true));
        }
    }
}

Filemanager

Name Type Size Permission Actions
GenerateUlidCommandTest.php File 4.14 KB 0644
GenerateUuidCommandTest.php File 9.71 KB 0644
InspectUlidCommandTest.php File 1.77 KB 0644
InspectUuidCommandTest.php File 11.54 KB 0644