Fixing tests in ComponentCollection and HelperCollection as return of trigger now depends on the triggered objects.

Removing annoying test that broke anytime something changed in Model.
This commit is contained in:
mark_story 2010-12-12 18:02:45 -05:00
parent bf22af6b7f
commit dc7ff8911d
3 changed files with 5 additions and 19 deletions

View file

@ -150,7 +150,7 @@ class ComponentCollectionTest extends CakeTestCase {
$this->mockObjects[] = $this->Components->TriggerMockCookie;
$this->mockObjects[] = $this->Components->TriggerMockSecurity;
$this->assertTrue($this->Components->trigger('startup', array(&$controller)));
$this->assertNull($this->Components->trigger('startup', array(&$controller)));
}
/**
@ -174,7 +174,7 @@ class ComponentCollectionTest extends CakeTestCase {
$this->mockObjects[] = $this->Components->TriggerMockSecurity;
$result = $this->Components->trigger('initialize', array(&$controller), array('triggerDisabled' => true));
$this->assertTrue($result);
$this->assertNull($result);
}
/**
@ -197,7 +197,7 @@ class ComponentCollectionTest extends CakeTestCase {
$this->Components->disable('TriggerMockSecurity');
$this->assertTrue($this->Components->trigger('startup', array(&$controller)));
$this->assertNull($this->Components->trigger('startup', array(&$controller)));
}
/**

View file

@ -2115,20 +2115,6 @@ class SetTest extends CakeTestCase {
$result = Set::reverse($class);
$this->assertEquals($result, $expected);
$model = new Model(array('id' => false, 'name' => 'Model', 'table' => false));
$expected = array(
'Behaviors' => array('modelName' => 'Model'),
'useDbConfig' => 'default', 'useTable' => false, 'displayField' => null, 'id' => false, 'data' => array(), 'table' => 'models', 'primaryKey' => 'id', 'validate' => array(),
'validationErrors' => array(), 'tablePrefix' => null, 'name' => 'Model', 'alias' => 'Model', 'tableToModel' => array(), 'logTransactions' => false, 'cacheQueries' => false,
'belongsTo' => array(), 'hasOne' => array(), 'hasMany' => array(), 'hasAndBelongsToMany' => array(), 'actsAs' => null, 'whitelist' => array(), 'cacheSources' => true,
'findQueryType' => null, 'recursive' => 1, 'order' => null, 'virtualFields' => array(),
);
$result = Set::reverse($model);
ksort($result);
ksort($expected);
$this->assertEquals($result, $expected);
$class = new stdClass;
$class->User = new stdClass;
$class->User->id = 100;

View file

@ -137,7 +137,7 @@ class HelperCollectionTest extends CakeTestCase {
$this->mockObjects[] = $this->Helpers->TriggerMockForm;
$this->assertTrue($this->Helpers->trigger('beforeRender', array('one', 'two')));
$this->assertNull($this->Helpers->trigger('beforeRender', array('one', 'two')));
}
/**
@ -163,7 +163,7 @@ class HelperCollectionTest extends CakeTestCase {
$this->Helpers->disable('TriggerMockForm');
$this->assertTrue($this->Helpers->trigger('beforeRender', array('one', 'two')));
$this->assertNull($this->Helpers->trigger('beforeRender', array('one', 'two')));
}
/**