Comming ucUs SH3LL V.2

Path : /home/gujo45me/public_html/demo2/vendor/nikic/php-parser/test/PhpParser/Builder/
Disable Functions : exec,passthru,shell_exec,system
System : Linux server-604606.appsiete.com 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64

[ Home ][ Zone-h ][ Jumping ][ Symlink ][ Mass Depes ][ Command ]

File Upload :
Current File : /home/gujo45me/public_html/demo2/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php

<?php declare(strict_types=1);

use PhpParser\Builder;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
use PHPUnit\Framework\TestCase;

class UseTest extends TestCase
{
    protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NORMAL) {
        return new Builder\Use_($name, $type);
    }

    public function testCreation() {
        $node = $this->createUseBuilder('Foo\Bar')->getNode();
        $this->assertEquals(new Stmt\Use_([
            new Stmt\UseUse(new Name('Foo\Bar'), null)
        ]), $node);

        $node = $this->createUseBuilder(new Name('Foo\Bar'))->as('XYZ')->getNode();
        $this->assertEquals(new Stmt\Use_([
            new Stmt\UseUse(new Name('Foo\Bar'), 'XYZ')
        ]), $node);

        $node = $this->createUseBuilder('foo\bar', Stmt\Use_::TYPE_FUNCTION)->as('foo')->getNode();
        $this->assertEquals(new Stmt\Use_([
            new Stmt\UseUse(new Name('foo\bar'), 'foo')
        ], Stmt\Use_::TYPE_FUNCTION), $node);
    }
}

Copyright © 2019 | Powered By MecUs7