Rename hash to mapping

This commit is contained in:
Fabien Potencier
2024-06-16 17:59:12 +02:00
parent da4592793b
commit 5157402a77
13 changed files with 51 additions and 33 deletions
+5 -5
View File
@@ -111,7 +111,7 @@ class ExpressionParserTest extends TestCase
], 1),
],
// simple hash
// simple mapping
['{{ {"a": "b", "b": "c"} }}', new ArrayExpression([
new ConstantExpression('a', 1),
new ConstantExpression('b', 1),
@@ -121,7 +121,7 @@ class ExpressionParserTest extends TestCase
], 1),
],
// hash with trailing ,
// mapping with trailing ,
['{{ {"a": "b", "b": "c", } }}', new ArrayExpression([
new ConstantExpression('a', 1),
new ConstantExpression('b', 1),
@@ -131,7 +131,7 @@ class ExpressionParserTest extends TestCase
], 1),
],
// hash in an array
// mapping in an array
['{{ [1, {"a": "b", "b": "c"}] }}', new ArrayExpression([
new ConstantExpression(0, 1),
new ConstantExpression(1, 1),
@@ -147,7 +147,7 @@ class ExpressionParserTest extends TestCase
], 1),
],
// array in a hash
// array in a mapping
['{{ {"a": [1, 2], "b": "c"} }}', new ArrayExpression([
new ConstantExpression('a', 1),
new ArrayExpression([
@@ -181,7 +181,7 @@ class ExpressionParserTest extends TestCase
$this->createNameExpression('foo', ['spread' => true]),
], 1)],
// hash with spread operator
// mapping with spread operator
['{{ {"a": "b", "b": "c", ...otherLetters} }}',
new ArrayExpression([
new ConstantExpression('a', 1),