updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -54,7 +54,7 @@ abstract class AbstractHandlerTest extends TestCase
$property = new \ReflectionProperty($stream, 'tokens');
$property->setAccessible(true);
$this->assertEquals(array(), $property->getValue($stream));
$this->assertEquals([], $property->getValue($stream));
}
protected function assertRemainingContent(Reader $reader, $remainingContent)

View File

@@ -32,20 +32,20 @@ class CommentHandlerTest extends AbstractHandlerTest
public function getHandleValueTestData()
{
return array(
return [
// 2nd argument only exists for inherited method compatibility
array('/* comment */', new Token(null, null, null), ''),
array('/* comment */foo', new Token(null, null, null), 'foo'),
);
['/* comment */', new Token(null, null, null), ''],
['/* comment */foo', new Token(null, null, null), 'foo'],
];
}
public function getDontHandleValueTestData()
{
return array(
array('>'),
array('+'),
array(' '),
);
return [
['>'],
['+'],
[' '],
];
}
protected function generateHandler()

View File

@@ -20,24 +20,24 @@ class HashHandlerTest extends AbstractHandlerTest
{
public function getHandleValueTestData()
{
return array(
array('#id', new Token(Token::TYPE_HASH, 'id', 0), ''),
array('#123', new Token(Token::TYPE_HASH, '123', 0), ''),
return [
['#id', new Token(Token::TYPE_HASH, 'id', 0), ''],
['#123', new Token(Token::TYPE_HASH, '123', 0), ''],
array('#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'),
array('#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'),
);
['#id.class', new Token(Token::TYPE_HASH, 'id', 0), '.class'],
['#id element', new Token(Token::TYPE_HASH, 'id', 0), ' element'],
];
}
public function getDontHandleValueTestData()
{
return array(
array('id'),
array('123'),
array('<'),
array('<'),
array('#'),
);
return [
['id'],
['123'],
['<'],
['<'],
['#'],
];
}
protected function generateHandler()

View File

@@ -20,24 +20,24 @@ class IdentifierHandlerTest extends AbstractHandlerTest
{
public function getHandleValueTestData()
{
return array(
array('foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''),
array('foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'),
array('foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'),
array('foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'),
array('foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'),
);
return [
['foo', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ''],
['foo|bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '|bar'],
['foo.class', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '.class'],
['foo[attr]', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), '[attr]'],
['foo bar', new Token(Token::TYPE_IDENTIFIER, 'foo', 0), ' bar'],
];
}
public function getDontHandleValueTestData()
{
return array(
array('>'),
array('+'),
array(' '),
array('*|foo'),
array('/* comment */'),
);
return [
['>'],
['+'],
[' '],
['*|foo'],
['/* comment */'],
];
}
protected function generateHandler()

View File

@@ -19,26 +19,26 @@ class NumberHandlerTest extends AbstractHandlerTest
{
public function getHandleValueTestData()
{
return array(
array('12', new Token(Token::TYPE_NUMBER, '12', 0), ''),
array('12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''),
array('+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''),
array('-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''),
return [
['12', new Token(Token::TYPE_NUMBER, '12', 0), ''],
['12.34', new Token(Token::TYPE_NUMBER, '12.34', 0), ''],
['+12.34', new Token(Token::TYPE_NUMBER, '+12.34', 0), ''],
['-12.34', new Token(Token::TYPE_NUMBER, '-12.34', 0), ''],
array('12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'),
array('12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'),
);
['12 arg', new Token(Token::TYPE_NUMBER, '12', 0), ' arg'],
['12]', new Token(Token::TYPE_NUMBER, '12', 0), ']'],
];
}
public function getDontHandleValueTestData()
{
return array(
array('hello'),
array('>'),
array('+'),
array(' '),
array('/* comment */'),
);
return [
['hello'],
['>'],
['+'],
[' '],
['/* comment */'],
];
}
protected function generateHandler()

View File

@@ -20,25 +20,25 @@ class StringHandlerTest extends AbstractHandlerTest
{
public function getHandleValueTestData()
{
return array(
array('"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''),
array('"1"', new Token(Token::TYPE_STRING, '1', 1), ''),
array('" "', new Token(Token::TYPE_STRING, ' ', 1), ''),
array('""', new Token(Token::TYPE_STRING, '', 1), ''),
array("'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''),
return [
['"hello"', new Token(Token::TYPE_STRING, 'hello', 1), ''],
['"1"', new Token(Token::TYPE_STRING, '1', 1), ''],
['" "', new Token(Token::TYPE_STRING, ' ', 1), ''],
['""', new Token(Token::TYPE_STRING, '', 1), ''],
["'hello'", new Token(Token::TYPE_STRING, 'hello', 1), ''],
array("'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'),
);
["'foo'bar", new Token(Token::TYPE_STRING, 'foo', 1), 'bar'],
];
}
public function getDontHandleValueTestData()
{
return array(
array('hello'),
array('>'),
array('1'),
array(' '),
);
return [
['hello'],
['>'],
['1'],
[' '],
];
}
protected function generateHandler()

View File

@@ -18,23 +18,23 @@ class WhitespaceHandlerTest extends AbstractHandlerTest
{
public function getHandleValueTestData()
{
return array(
array(' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''),
array("\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''),
array("\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''),
return [
[' ', new Token(Token::TYPE_WHITESPACE, ' ', 0), ''],
["\n", new Token(Token::TYPE_WHITESPACE, "\n", 0), ''],
["\t", new Token(Token::TYPE_WHITESPACE, "\t", 0), ''],
array(' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'),
array(' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'),
);
[' foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), 'foo'],
[' .foo', new Token(Token::TYPE_WHITESPACE, ' ', 0), '.foo'],
];
}
public function getDontHandleValueTestData()
{
return array(
array('>'),
array('1'),
array('a'),
);
return [
['>'],
['1'],
['a'],
];
}
protected function generateHandler()