Skip to content

Commit 49aba92

Browse files
alexandre-dauboisnicolas-grekas
authored andcommitted
[Tests] Migrate data providers to static ones
1 parent fa79168 commit 49aba92

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Tests/ParserTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testParse($node, $expression, $names = [])
4747
$this->assertEquals($node, $parser->parse($lexer->tokenize($expression), $names));
4848
}
4949

50-
public function getParseData()
50+
public static function getParseData()
5151
{
5252
$arguments = new Node\ArgumentsNode();
5353
$arguments->addElement(new Node\ConstantNode('arg1'));
@@ -139,10 +139,10 @@ public function getParseData()
139139

140140
// chained calls
141141
[
142-
$this->createGetAttrNode(
143-
$this->createGetAttrNode(
144-
$this->createGetAttrNode(
145-
$this->createGetAttrNode(new Node\NameNode('foo'), 'bar', Node\GetAttrNode::METHOD_CALL),
142+
self::createGetAttrNode(
143+
self::createGetAttrNode(
144+
self::createGetAttrNode(
145+
self::createGetAttrNode(new Node\NameNode('foo'), 'bar', Node\GetAttrNode::METHOD_CALL),
146146
'foo', Node\GetAttrNode::METHOD_CALL),
147147
'baz', Node\GetAttrNode::PROPERTY_CALL),
148148
'3', Node\GetAttrNode::ARRAY_CALL),
@@ -192,7 +192,7 @@ public function getParseData()
192192
];
193193
}
194194

195-
private function createGetAttrNode($node, $item, $type)
195+
private static function createGetAttrNode($node, $item, $type)
196196
{
197197
return new Node\GetAttrNode($node, new Node\ConstantNode($item, Node\GetAttrNode::ARRAY_CALL !== $type), new Node\ArgumentsNode(), $type);
198198
}
@@ -208,7 +208,7 @@ public function testParseWithInvalidPostfixData($expr, $names = [])
208208
$parser->parse($lexer->tokenize($expr), $names);
209209
}
210210

211-
public function getInvalidPostfixData()
211+
public static function getInvalidPostfixData()
212212
{
213213
return [
214214
[
@@ -258,7 +258,7 @@ public function testLint($expression, $names, string $exception = null)
258258
$this->expectNotToPerformAssertions();
259259
}
260260

261-
public function getLintData(): array
261+
public static function getLintData(): array
262262
{
263263
return [
264264
'valid expression' => [

0 commit comments

Comments
 (0)