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 ErrorTest extends TestCase { public function testConstruct() { $attributes = [ 'startLine' => 10, 'endLine' => 11, ]; $error = new Error('Some error', $attributes); $this->assertSame('Some error', $error->getRawMessage()); $this->assertSame($attributes, $error->getAttributes()); $this->assertSame(10, $error->getStartLine()); $this->assertSame(11, $error->getEndLine()); $this->assertSame('Some error on line 10', $error->getMessage()); return $error; } /** * @depends testConstruct */ public function testSetMessageAndLine(Error $error) { $error->setRawMessage('Some other error'); $this->assertSame('Some other error', $error->getRawMessage()); $error->setStartLine(15); $this->assertSame(15, $error->getStartLine()); $this->assertSame('Some other error on line 15', $error->getMessage()); } public function testUnknownLine() { $error = new Error('Some error'); $this->assertSame(-1, $error->getStartLine()); $this->assertSame(-1, $error->getEndLine()); $this->assertSame('Some error on unknown line', $error->getMessage()); } /** @dataProvider provideTestColumnInfo */ public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColumn) { $error = new Error('Some error', [ 'startFilePos' => $startPos, 'endFilePos' => $endPos, ]); $this->assertTrue($error->hasColumnInfo()); $this->assertSame($startColumn, $error->getStartColumn($code)); $this->assertSame($endColumn, $error->getEndColumn($code)); } public function provideTestColumnInfo() { return [ // Error at "bar" ["<?php foo bar baz", 10, 12, 11, 13], ["<?php\nfoo bar baz", 10, 12, 5, 7], ["<?php foo\nbar baz", 10, 12, 1, 3], ["<?php foo bar\nbaz", 10, 12, 11, 13], ["<?php\r\nfoo bar baz", 11, 13, 5, 7], // Error at "baz" ["<?php foo bar baz", 14, 16, 15, 17], ["<?php foo bar\nbaz", 14, 16, 1, 3], // Error at string literal ["<?php foo 'bar\nbaz' xyz", 10, 18, 11, 4], ["<?php\nfoo 'bar\nbaz' xyz", 10, 18, 5, 4], ["<?php foo\n'\nbarbaz\n'\nxyz", 10, 19, 1, 1], // Error over full string ["<?php", 0, 4, 1, 5], ["<?\nphp", 0, 5, 1, 3], ]; } public function testNoColumnInfo() { $error = new Error('Some error', 3); $this->assertFalse($error->hasColumnInfo()); try { $error->getStartColumn(''); $this->fail('Expected RuntimeException'); } catch (\RuntimeException $e) { $this->assertSame('Error does not have column information', $e->getMessage()); } try { $error->getEndColumn(''); $this->fail('Expected RuntimeException'); } catch (\RuntimeException $e) { $this->assertSame('Error does not have column information', $e->getMessage()); } } public function testInvalidPosInfo() { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('Invalid position information'); $error = new Error('Some error', [ 'startFilePos' => 10, 'endFilePos' => 11, ]); $error->getStartColumn('code'); } }