Skip to content
Permalink
Browse files

Add/correct some tests for humanize.

The arguments for assertEquals() were backwards. While there are many
more flipped assertions I will change the others separately.
  • Loading branch information...
markstory committed Jun 5, 2015
1 parent 239c839 commit 0e6fcc02b809b5885009e458a04c67e3c9427b57
Showing with 10 additions and 9 deletions.
  1. +10 −9 lib/Cake/Test/Case/Utility/InflectorTest.php
@@ -504,10 +504,10 @@ public function testClassNaming() {
* @return void
*/
public function testTableNaming() {
$this->assertEquals(Inflector::tableize('ArtistsGenre'), 'artists_genres');
$this->assertEquals(Inflector::tableize('FileSystem'), 'file_systems');
$this->assertEquals(Inflector::tableize('News'), 'news');
$this->assertEquals(Inflector::tableize('Bureau'), 'bureaus');
$this->assertEquals('artists_genres', Inflector::tableize('ArtistsGenre'));
$this->assertEquals('file_systems', Inflector::tableize('FileSystem'));
$this->assertEquals('news', Inflector::tableize('News'));
$this->assertEquals('bureaus', Inflector::tableize('Bureau'));
}
/**
@@ -516,11 +516,12 @@ public function testTableNaming() {
* @return void
*/
public function testHumanization() {
$this->assertEquals(Inflector::humanize('posts'), 'Posts');
$this->assertEquals(Inflector::humanize('posts_tags'), 'Posts Tags');
$this->assertEquals(Inflector::humanize('file_systems'), 'File Systems');
$this->assertEquals(Inflector::humanize('hello_wörld'), 'Hello Wörld');
$this->assertEquals(Inflector::humanize('福岡_city'), '福岡 City');
$this->assertEquals('Posts', Inflector::humanize('posts'));
$this->assertEquals('Posts Tags', Inflector::humanize('posts_tags'));
$this->assertEquals('File Systems', Inflector::humanize('file_systems'));
$this->assertEquals('FiLe SysTems', Inflector::humanize('FiLe_SysTems'));
$this->assertEquals('Hello Wörld', Inflector::humanize('hello_wörld'));
$this->assertEquals('福岡 City', Inflector::humanize('福岡_city'));
}
/**

0 comments on commit 0e6fcc0

Please sign in to comment.
You can’t perform that action at this time.