From adc23dc9649aa9fce523e3b7b757cff85476af06 Mon Sep 17 00:00:00 2001 From: Jason Walton Date: Mon, 10 Sep 2012 11:25:08 -0700 Subject: [PATCH] Added traffic and chassis as uncountable words to properly feed pluralizer Signed-off-by: Jason Walton --- application/config/strings.php | 4 +++- laravel/tests/application/config/strings.php | 7 +++++-- laravel/tests/cases/str.test.php | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/application/config/strings.php b/application/config/strings.php index 3d8b68f6..bbbe230c 100644 --- a/application/config/strings.php +++ b/application/config/strings.php @@ -96,6 +96,8 @@ 'sheep', 'species', 'moose', + 'chassis', + 'traffic', ), /* @@ -185,4 +187,4 @@ ), -); \ No newline at end of file +); diff --git a/laravel/tests/application/config/strings.php b/laravel/tests/application/config/strings.php index 730f973e..bbbe230c 100644 --- a/laravel/tests/application/config/strings.php +++ b/laravel/tests/application/config/strings.php @@ -8,7 +8,7 @@ |-------------------------------------------------------------------------- | | 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. | | Note that the regular expressions are only for inflecting English words. @@ -95,6 +95,9 @@ 'series', 'sheep', 'species', + 'moose', + 'chassis', + 'traffic', ), /* @@ -184,4 +187,4 @@ ), -); \ No newline at end of file +); diff --git a/laravel/tests/cases/str.test.php b/laravel/tests/cases/str.test.php index 7daab540..7c380600 100644 --- a/laravel/tests/cases/str.test.php +++ b/laravel/tests/cases/str.test.php @@ -96,6 +96,8 @@ public function testStringsCanBeSingularOrPlural() $this->assertEquals('Users', Str::plural('User')); $this->assertEquals('user', Str::plural('user', 1)); $this->assertEquals('users', Str::plural('user', 2)); + $this->assertEquals('chassis', Str::plural('chassis', 2)); + $this->assertEquals('traffic', Str::plural('traffic', 2)); } /** @@ -130,4 +132,4 @@ public function testRandomStringsCanBeGenerated() $this->assertEquals(40, strlen(Str::random(40))); } -} \ No newline at end of file +}