From 5c2e4821f7b02734cc28cfa266fbdec9dc5acc8b Mon Sep 17 00:00:00 2001 From: nate Date: Tue, 6 Feb 2007 23:57:45 +0000 Subject: [PATCH] Adding Inflector test for Ticket #2061 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4463 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/inflector.test.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cake/tests/cases/libs/inflector.test.php b/cake/tests/cases/libs/inflector.test.php index 47fb202de..8143938fd 100644 --- a/cake/tests/cases/libs/inflector.test.php +++ b/cake/tests/cases/libs/inflector.test.php @@ -41,8 +41,17 @@ class InflectorTest extends UnitTestCase { } function testInflectingStuff() { - $this->assertEqual($this->inflector->pluralize('Bus'), 'Buses', 'Badness!'); - $this->assertEqual($this->inflector->pluralize('bus'), 'buses', 'Badness!'); + $result = $this->inflector->pluralize('Bus'); + $expected = 'Buses'; + $this->assertEqual($result, $expected, "Badness! Expected '{$expected}', got '{$result}'"); + + $result = $this->inflector->pluralize('bus'); + $expected = 'buses'; + $this->assertEqual($this->inflector->pluralize('bus'), 'buses', "Badness! Expected '{$expected}', got '{$result}'"); + + $result = $this->inflector->singularize('menus'); + $expected = 'menu'; + $this->assertEqual($result, $expected, "Badness! Expected '{$expected}', got '{$result}'"); } function tearDown() {