diff --git a/Tests/Util/PropelInflectorTest.php b/Tests/Util/PropelInflectorTest.php new file mode 100644 index 0000000..0ebfa02 --- /dev/null +++ b/Tests/Util/PropelInflectorTest.php @@ -0,0 +1,46 @@ + + */ +class PropelInflectorTest extends TestCase +{ + /** + * @dataProvider dataProviderForTestCamelize + */ + public function testCamelize($word, $expected) + { + $this->assertEquals($expected, PropelInflector::camelize($word)); + } + + public static function dataProviderForTestCamelize() + { + return array( + array('', ''), + array(null, null), + array('foo', 'foo'), + array('Foo', 'foo'), + array('fooBar', 'fooBar'), + array('FooBar', 'fooBar'), + array('Foo_bar', 'fooBar'), + array('Foo_Bar', 'fooBar'), + array('Foo Bar', 'fooBar'), + array('Foo bar Baz', 'fooBarBaz'), + array('Foo_Bar_Baz', 'fooBarBaz'), + array('foo_bar_baz', 'fooBarBaz'), + ); + } +}