Merge pull request #654 from jellehenkens/2.2-schema-shell-test

Fixing test assert for APP_DIR scenarios with non standard folder names
This commit is contained in:
Mark Story 2012-05-13 17:30:30 -07:00
commit 405aacc0fc

View file

@ -135,7 +135,7 @@ class SchemaShellTest extends CakeTestCase {
$this->Shell->startup(); $this->Shell->startup();
$this->assertTrue(isset($this->Shell->Schema)); $this->assertTrue(isset($this->Shell->Schema));
$this->assertTrue(is_a($this->Shell->Schema, 'CakeSchema')); $this->assertTrue(is_a($this->Shell->Schema, 'CakeSchema'));
$this->assertEquals(strtolower(APP_DIR), strtolower($this->Shell->Schema->name)); $this->assertEquals(Inflector::camelize(Inflector::slug(APP_DIR)), $this->Shell->Schema->name);
$this->assertEquals('schema.php', $this->Shell->Schema->file); $this->assertEquals('schema.php', $this->Shell->Schema->file);
$this->Shell->Schema = null; $this->Shell->Schema = null;
@ -155,7 +155,7 @@ class SchemaShellTest extends CakeTestCase {
'path' => '/test/path' 'path' => '/test/path'
); );
$this->Shell->startup(); $this->Shell->startup();
$this->assertEquals(strtolower(APP_DIR), strtolower($this->Shell->Schema->name)); $this->assertEquals(Inflector::camelize(Inflector::slug(APP_DIR)), $this->Shell->Schema->name);
$this->assertEquals('other_file.php', $this->Shell->Schema->file); $this->assertEquals('other_file.php', $this->Shell->Schema->file);
$this->assertEquals('test', $this->Shell->Schema->connection); $this->assertEquals('test', $this->Shell->Schema->connection);
$this->assertEquals('/test/path', $this->Shell->Schema->path); $this->assertEquals('/test/path', $this->Shell->Schema->path);