From 75405247beed4ac51ef08ade5676d90ed1f2fa96 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Mon, 4 May 2020 09:08:14 +0200 Subject: [PATCH] [3.4][Inflector] Improve testSingularize() argument name --- .../Component/Inflector/Tests/InflectorTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Component/Inflector/Tests/InflectorTest.php b/src/Symfony/Component/Inflector/Tests/InflectorTest.php index ea752b3fac..d43b7ea562 100644 --- a/src/Symfony/Component/Inflector/Tests/InflectorTest.php +++ b/src/Symfony/Component/Inflector/Tests/InflectorTest.php @@ -160,15 +160,15 @@ class InflectorTest extends TestCase /** * @dataProvider singularizeProvider */ - public function testSingularize($plural, $singular) + public function testSingularize($plural, $expectedSingular) { - $single = Inflector::singularize($plural); - if (\is_string($singular) && \is_array($single)) { - $this->fail("--- Expected\n`string`: ".$singular."\n+++ Actual\n`array`: ".implode(', ', $single)); - } elseif (\is_array($singular) && \is_string($single)) { - $this->fail("--- Expected\n`array`: ".implode(', ', $singular)."\n+++ Actual\n`string`: ".$single); + $singular = Inflector::singularize($plural); + if (\is_string($expectedSingular) && \is_array($singular)) { + $this->fail("--- Expected\n`string`: ".$expectedSingular."\n+++ Actual\n`array`: ".implode(', ', $singular)); + } elseif (\is_array($expectedSingular) && \is_string($singular)) { + $this->fail("--- Expected\n`array`: ".implode(', ', $expectedSingular)."\n+++ Actual\n`string`: ".$singular); } - $this->assertEquals($singular, $single); + $this->assertEquals($expectedSingular, $singular); } }