Skip to content

Commit 9dcd95e

Browse files
committed
[CLEANUP] Simplify a data provider
Remove logic to make it easier to grok.
1 parent 86aeaa7 commit 9dcd95e

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

tests/Unit/Value/ValueTest.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,12 @@ final class ValueTest extends TestCase
2828
*/
2929
public static function provideArithmeticOperator(): array
3030
{
31-
$units = ['+', '-', '*', '/'];
32-
33-
return \array_combine(
34-
$units,
35-
\array_map(
36-
static function (string $unit): array {
37-
return [$unit];
38-
},
39-
$units
40-
)
41-
);
31+
return [
32+
'+' => ['+'],
33+
'-' => ['-'],
34+
'*' => ['*'],
35+
'/' => ['/'],
36+
];
4237
}
4338

4439
/**
@@ -53,7 +48,7 @@ public function parsesArithmeticInFunctions(string $operator): void
5348
self::DEFAULT_DELIMITERS
5449
);
5550

56-
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', (string) $subject);
51+
self::assertSame('max(300px,50vh ' . $operator . ' 10px)', (string)$subject);
5752
}
5853

5954
/**
@@ -95,7 +90,7 @@ public function parsesArithmeticWithMultipleOperatorsInFunctions(
9590
self::DEFAULT_DELIMITERS
9691
);
9792

98-
self::assertSame(\sprintf($expectedResultTemplate, $expression), (string) $subject);
93+
self::assertSame(\sprintf($expectedResultTemplate, $expression), (string)$subject);
9994
}
10095

10196
/**
@@ -123,6 +118,6 @@ public function parsesArithmeticWithMalformedOperandsInFunctions(string $leftOpe
123118
self::DEFAULT_DELIMITERS
124119
);
125120

126-
self::assertSame('max(300px,' . $leftOperand . ' + ' . $rightOperand . ')', (string) $subject);
121+
self::assertSame('max(300px,' . $leftOperand . ' + ' . $rightOperand . ')', (string)$subject);
127122
}
128123
}

0 commit comments

Comments
 (0)