Skip to content

Commit

Permalink
Fixing CakeSchema to test APP_DIR with different names than all lower…
Browse files Browse the repository at this point in the history
…case
  • Loading branch information
Jelle Henkens committed May 15, 2012
1 parent 6bb29ea commit 110536d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/Cake/Test/Case/Model/CakeSchemaTest.php
Expand Up @@ -510,12 +510,24 @@ public function tearDown() {
*/
public function testSchemaName() {
$Schema = new CakeSchema();
$this->assertEquals(strtolower(APP_DIR), strtolower($Schema->name));
$this->assertEquals(Inflector::camelize(Inflector::slug(APP_DIR)), $Schema->name);

Configure::write('App.dir', 'Some.name.with.dots');
$Schema = new CakeSchema();
$this->assertEquals('SomeNameWithDots', $Schema->name);

Configure::write('App.dir', 'Some-name-with-dashes');
$Schema = new CakeSchema();
$this->assertEquals('SomeNameWithDashes', $Schema->name);

Configure::write('App.dir', 'Some name with spaces');
$Schema = new CakeSchema();
$this->assertEquals('SomeNameWithSpaces', $Schema->name);

Configure::write('App.dir', 'Some,name;with&weird=characters');
$Schema = new CakeSchema();
$this->assertEquals('SomeNameWithWeirdCharacters', $Schema->name);

Configure::write('App.dir', 'app');
}

Expand Down

0 comments on commit 110536d

Please sign in to comment.