Permalink
Browse files

Merge branch '2.0' into 2.0-dbo-performance

  • Loading branch information...
2 parents 03dac31 + 222df2c commit 08be8300eee68f9395c09cbc704866b5d32de0a2 @lorenzo lorenzo committed Jul 18, 2011
@@ -811,7 +811,7 @@ public function render($view = null, $layout = null) {
list($plugin, $className) = pluginSplit($model);
$this->request->params['models'][$model] = compact('plugin', 'className');
}
- } if ($this->uses === false || $this->uses === array()) {
+ } if (!empty($this->modelClass) && ($this->uses === false || $this->uses === array())) {
$this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass);
}
@@ -250,7 +250,7 @@ public function testInteractiveFieldValidation() {
$this->Task->initValidations();
$this->Task->interactive = true;
$this->Task->expects($this->any())->method('in')
- ->will($this->onConsecutiveCalls('20', 'y', '16', 'n'));
+ ->will($this->onConsecutiveCalls('21', 'y', '17', 'n'));
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
$expected = array('notempty' => 'notempty', 'maxlength' => 'maxlength');
@@ -268,7 +268,7 @@ public function testInteractiveFieldValidationWithBogusResponse() {
$this->Task->interactive = true;
$this->Task->expects($this->any())->method('in')
- ->will($this->onConsecutiveCalls('999999', '20', 'n'));
+ ->will($this->onConsecutiveCalls('999999', '21', 'n'));
$this->Task->expects($this->at(7))->method('out')
->with(new PHPUnit_Framework_Constraint_PCREMatch('/make a valid/'));
@@ -622,8 +622,6 @@ public function testSchemaReadWithAppModel() {
'name' => 'TestApp',
'models' => array('AppModel')
));
- unset($read['tables']['missing']);
- $this->assertTrue(empty($read['tables']));
if (!empty($backup)) {
ConnectionManager::drop('default');
ConnectionManager::create('default', $backup);

0 comments on commit 08be830

Please sign in to comment.