Commit 705cd6a9 authored by Dayle Rees's avatar Dayle Rees

Merge pull request #1203 from xsbeats/bugfix/pluralizer_uncountable

Added 'traffic' and 'chassis' as uncountable words to feed pluralizer
parents a5bb035e adc23dc9
...@@ -96,6 +96,8 @@ return array( ...@@ -96,6 +96,8 @@ return array(
'sheep', 'sheep',
'species', 'species',
'moose', 'moose',
'chassis',
'traffic',
), ),
/* /*
......
...@@ -8,7 +8,7 @@ return array( ...@@ -8,7 +8,7 @@ return array(
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This array contains the singular and plural forms of words. It's used by | This array contains the singular and plural forms of words. It's used by
| the "singular" and "plural" methods on the Str class to convert a given | the "singular" and "plural" methods in the Str class to convert a given
| word from singular to plural and vice versa. | word from singular to plural and vice versa.
| |
| Note that the regular expressions are only for inflecting English words. | Note that the regular expressions are only for inflecting English words.
...@@ -95,6 +95,9 @@ return array( ...@@ -95,6 +95,9 @@ return array(
'series', 'series',
'sheep', 'sheep',
'species', 'species',
'moose',
'chassis',
'traffic',
), ),
/* /*
......
...@@ -96,6 +96,8 @@ class StrTest extends PHPUnit_Framework_TestCase { ...@@ -96,6 +96,8 @@ class StrTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('Users', Str::plural('User')); $this->assertEquals('Users', Str::plural('User'));
$this->assertEquals('user', Str::plural('user', 1)); $this->assertEquals('user', Str::plural('user', 1));
$this->assertEquals('users', Str::plural('user', 2)); $this->assertEquals('users', Str::plural('user', 2));
$this->assertEquals('chassis', Str::plural('chassis', 2));
$this->assertEquals('traffic', Str::plural('traffic', 2));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment