[Inflector] Fix testPluralize() arguments names
This commit is contained in:
parent
a5ae434a92
commit
fb42f98315
@ -309,15 +309,15 @@ class InflectorTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @dataProvider pluralizeProvider
|
* @dataProvider pluralizeProvider
|
||||||
*/
|
*/
|
||||||
public function testPluralize($plural, $singular)
|
public function testPluralize($singular, $expectedPlural)
|
||||||
{
|
{
|
||||||
$single = Inflector::pluralize($plural);
|
$plural = Inflector::pluralize($singular);
|
||||||
if (\is_string($singular) && \is_array($single)) {
|
if (\is_string($expectedPlural) && \is_array($plural)) {
|
||||||
$this->fail("--- Expected\n`string`: ".$singular."\n+++ Actual\n`array`: ".implode(', ', $single));
|
$this->fail("--- Expected\n`string`: ".$expectedPlural."\n+++ Actual\n`array`: ".implode(', ', $plural));
|
||||||
} elseif (\is_array($singular) && \is_string($single)) {
|
} elseif (\is_array($expectedPlural) && \is_string($plural)) {
|
||||||
$this->fail("--- Expected\n`array`: ".implode(', ', $singular)."\n+++ Actual\n`string`: ".$single);
|
$this->fail("--- Expected\n`array`: ".implode(', ', $expectedPlural)."\n+++ Actual\n`string`: ".$plural);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEquals($singular, $single);
|
$this->assertEquals($expectedPlural, $plural);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user