Skip to content

Commit

Permalink
Adding more tests to check cache paths and stupid values.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Jan 10, 2010
1 parent 3bd8bd2 commit 0959de6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cake/tests/cases/libs/inflector.test.php
Expand Up @@ -256,6 +256,17 @@ function testInflectorUnderscore() {
$this->assertIdentical(Inflector::underscore('testThing'), 'test_thing');
$this->assertIdentical(Inflector::underscore('TestThingExtra'), 'test_thing_extra');
$this->assertIdentical(Inflector::underscore('testThingExtra'), 'test_thing_extra');

// Identical checks test the cache code path.
$this->assertIdentical(Inflector::underscore('TestThing'), 'test_thing');
$this->assertIdentical(Inflector::underscore('testThing'), 'test_thing');
$this->assertIdentical(Inflector::underscore('TestThingExtra'), 'test_thing_extra');
$this->assertIdentical(Inflector::underscore('testThingExtra'), 'test_thing_extra');

// Test stupid values
$this->assertIdentical(Inflector::underscore(''), '');
$this->assertIdentical(Inflector::underscore(0), '0');
$this->assertIdentical(Inflector::underscore(false), '');
}

/**
Expand Down

0 comments on commit 0959de6

Please sign in to comment.