Updating tests and classes in Console package after most recent updates in folder casing

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-14 23:40:09 -04:30
parent eea981940e
commit 5f56642e0e
6 changed files with 21 additions and 20 deletions

View file

@ -440,7 +440,7 @@ class SchemaShell extends Shell {
);
$path = array(
'help' => __d('cake_console', 'Path to read and write schema.php'),
'default' => CONFIGS . 'schema'
'default' => CONFIGS . 'Schema'
);
$file = array(
'help' => __d('cake_console', 'File name to read and write.'),

View file

@ -94,7 +94,7 @@ class CakeSchema extends Object {
}
if (empty($options['path'])) {
$this->path = CONFIGS . 'schema';
$this->path = CONFIGS . 'Schema';
}
$options = array_merge(get_object_vars($this), $options);
@ -128,7 +128,7 @@ class CakeSchema extends Object {
if (file_exists($this->path . DS . $file) && is_file($this->path . DS . $file)) {
$this->file = $file;
} elseif (!empty($this->plugin)) {
$this->path = App::pluginPath($this->plugin) . 'Config' . DS . 'schema';
$this->path = CakePlugin::path($this->plugin) . 'Config' . DS . 'Schema';
}
}

View file

@ -151,7 +151,7 @@ class SchemaShellTest extends CakeTestCase {
$this->assertEqual($this->Shell->Schema->name, 'TestSchema');
$this->assertEqual($this->Shell->Schema->file, 'test_schema.php');
$this->assertEqual($this->Shell->Schema->connection, 'default');
$this->assertEqual($this->Shell->Schema->path, APP . 'Config' . DS . 'schema');
$this->assertEqual($this->Shell->Schema->path, APP . 'Config' . DS . 'Schema');
$this->Shell->Schema = null;
$this->Shell->params = array(

View file

@ -164,7 +164,7 @@ class ExtractTaskTest extends CakeTestCase {
$this->Task->params['paths'] = LIBS . 'Test' . DS . 'test_app' . DS . 'View';
$this->Task->params['output'] = $this->path . DS;
$this->Task->params['exclude'] = 'pages,layouts';
$this->Task->params['exclude'] = 'Pages,Layouts';
$this->Task->expects($this->any())->method('in')
->will($this->returnValue('y'));

View file

@ -110,11 +110,12 @@ class PluginTaskTest extends CakeTestCase {
*/
public function testExecuteWithNoArgs() {
$this->Task->expects($this->at(0))->method('in')->will($this->returnValue('TestPlugin'));
$this->Task->expects($this->at(1))->method('in')->will($this->returnValue('3'));
$this->Task->expects($this->at(1))->method('in')->will($this->returnValue($this->_testPath));
$this->Task->expects($this->at(2))->method('in')->will($this->returnValue('y'));
$path = $this->Task->path . 'TestPlugin';
$file = $path . DS . 'Controller' . DS . 'TestPluginAppController.php';
$this->Task->expects($this->at(3))->method('createFile')
->with($file, new PHPUnit_Framework_Constraint_IsAnything());

View file

@ -87,7 +87,7 @@ class ProjectTaskTest extends CakeTestCase {
$this->assertTrue(is_dir($path), 'No project dir %s');
$dirs = array(
'Config',
'Config' . DS . 'schema',
'Config' . DS . 'Schema',
'Console',
'Console' . DS . 'Command',
'Console' . DS . 'Command' . DS . 'Task',
@ -95,10 +95,10 @@ class ProjectTaskTest extends CakeTestCase {
'Model',
'View',
'View' . DS . 'Helper',
'tests',
'tests' . DS . 'Case',
'tests' . DS . 'Case' . DS . 'Model',
'tests' . DS . 'Fixture',
'Test',
'Test' . DS . 'Case',
'Test' . DS . 'Case' . DS . 'Model',
'Test' . DS . 'Fixture',
'tmp',
'webroot',
'webroot' . DS . 'js',
@ -124,12 +124,12 @@ class ProjectTaskTest extends CakeTestCase {
'Controller' . DS . 'Component',
'Model' . DS . 'Behavior',
'View' . DS . 'Helper',
'View' . DS . 'errors',
'View' . DS . 'scaffolds',
'tests' . DS . 'Case' . DS . 'Model',
'tests' . DS . 'Case' . DS . 'Controller',
'tests' . DS . 'Case' . DS . 'View' . DS . 'Helper',
'tests' . DS . 'Fixture',
'View' . DS . 'Errors',
'View' . DS . 'Scaffolds',
'Test' . DS . 'Case' . DS . 'Model',
'Test' . DS . 'Case' . DS . 'Controller',
'Test' . DS . 'Case' . DS . 'View' . DS . 'Helper',
'Test' . DS . 'Fixture',
'webroot' . DS . 'js'
);
@ -269,9 +269,9 @@ class ProjectTaskTest extends CakeTestCase {
$this->assertTrue(is_dir($path . DS . 'Model'), 'No models dir');
$this->assertTrue(is_dir($path . DS . 'View'), 'No views dir');
$this->assertTrue(is_dir($path . DS . 'View' . DS . 'Helper'), 'No helpers dir');
$this->assertTrue(is_dir($path . DS . 'tests'), 'No tests dir');
$this->assertTrue(is_dir($path . DS . 'tests' . DS . 'Case'), 'No cases dir');
$this->assertTrue(is_dir($path . DS . 'tests' . DS . 'Fixture'), 'No fixtures dir');
$this->assertTrue(is_dir($path . DS . 'Test'), 'No tests dir');
$this->assertTrue(is_dir($path . DS . 'Test' . DS . 'Case'), 'No cases dir');
$this->assertTrue(is_dir($path . DS . 'Test' . DS . 'Fixture'), 'No fixtures dir');
}
/**