From 7a4f9922103c8f4b404f75679876883fd8c76105 Mon Sep 17 00:00:00 2001 From: Joshua Sherman Date: Tue, 31 Dec 2013 11:08:19 -0500 Subject: [PATCH] Added TODO and new tests Catching up the existing tests to include any new functionality that hasn't had a test written yet. --- tests/classes/StringTest.php | 27 +++++++++++++++++++++++++++ tests/classes/TODO | 21 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tests/classes/TODO diff --git a/tests/classes/StringTest.php b/tests/classes/StringTest.php index 10ee034..9d3cb09 100644 --- a/tests/classes/StringTest.php +++ b/tests/classes/StringTest.php @@ -105,6 +105,33 @@ class StringTest extends PHPUnit_Framework_TestCase array('FOO@BAR.COM', 'FOO@BAR.COM'), ); } + + /** + * @dataProvider providerGenerateSlug + */ + public function testGenerateSlug($a, $b) + { + $this->assertEquals($b, String::generateSlug($a)); + } + + public function providerGenerateSlug() + { + return array( + array('TEST STRING', 'test-string'), + array('Test String', 'test-string'), + array('TEST STRING', 'test-string'), + array('#! Test String', 'test-string'), + array('-test--string-', 'test-string'), + ); + } + + public function testPluralize() + { + $this->assertEquals('test', String::pluralize('test', 1, false)); + $this->assertEquals('1 test', String::pluralize('test', 1, true)); + $this->assertEquals('tests', String::pluralize('test', 2, false)); + $this->assertEquals('2 tests', String::pluralize('test', 2, true)); + } } ?> diff --git a/tests/classes/TODO b/tests/classes/TODO new file mode 100644 index 0000000..a80ba29 --- /dev/null +++ b/tests/classes/TODO @@ -0,0 +1,21 @@ +Browser +Cache +Config +Distance +Dynamic +File +Form +HTML +Log +Model +Module +Number +Object +Profiler +Security +Session +Sort +Time +Validate + +Stuff in API directory