Revert "Make tests compatible with PHP 7"

This reverts commit 91295a0790.

This should no longer be necessary.

Conflicts:
	test/PhpParser/ParserTest.php
This commit is contained in:
Nikita Popov 2015-07-14 19:21:38 +02:00
parent d341d94976
commit b9afcdfd92
3 changed files with 10 additions and 15 deletions

View File

@ -144,19 +144,6 @@ EOC;
$parser = new Parser($lexer);
$parser->parse('dummy');
}
public function testInvalidOctals() {
if (version_compare(PHP_VERSION, '7.0-dev', '>=')) {
$this->markTestSkipped('Cannot parse invalid octal numbers on PHP 7');
}
$parser = new Parser(new Lexer);
$stmts = $parser->parse('<?php 0787; 0177777777777777777777787;');
$this->assertInstanceof('PhpParser\Node\Scalar\LNumber', $stmts[0]);
$this->assertInstanceof('PhpParser\Node\Scalar\DNumber', $stmts[1]);
$this->assertSame(7, $stmts[0]->value);
$this->assertSame(0xFFFFFFFFFFFFFFFF, $stmts[1]->value);
}
}
class InvalidTokenLexer extends Lexer {

View File

@ -18,6 +18,7 @@ Different float syntaxes
18446744073709551615;
0xFFFFFFFFFFFFFFFF;
01777777777777777777777;
0177777777777777777777787;
0b1111111111111111111111111111111111111111111111111111111111111111;
-----
array(
@ -63,4 +64,7 @@ array(
13: Scalar_DNumber(
value: @@{ 0xFFFFFFFFFFFFFFFF }@@
)
)
14: Scalar_DNumber(
value: @@{ 0xFFFFFFFFFFFFFFFF }@@
)
)

View File

@ -10,6 +10,7 @@ Different integer syntaxes
0xfff;
0XfFf;
0777;
0787;
0b111000111000;
-----
array(
@ -38,6 +39,9 @@ array(
value: 511
)
8: Scalar_LNumber(
value: 7
)
9: Scalar_LNumber(
value: 3640
)
)
)