mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Starting to update a test that was previously marked incomplete.
This commit is contained in:
parent
238c734f70
commit
36e585bb23
1 changed files with 7 additions and 19 deletions
|
@ -193,10 +193,9 @@ class OrangeComponent extends Component {
|
|||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initialize(&$controller, $settings) {
|
||||
function initialize(&$controller) {
|
||||
$this->Controller = $controller;
|
||||
$this->Banana->testField = 'OrangeField';
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -384,28 +383,17 @@ class ComponentTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
function testSomethingReferencingEmailComponent() {
|
||||
$this->markTestIncomplete('Will need to be updated');
|
||||
|
||||
$Controller =& new ComponentTestController();
|
||||
$Controller = new ComponentTestController();
|
||||
$Controller->components = array('SomethingWithEmail');
|
||||
$Controller->uses = false;
|
||||
$Controller->constructClasses();
|
||||
$Controller->Component->initialize($Controller);
|
||||
$Controller->Components->trigger('initialize', array(&$Controller));
|
||||
$Controller->beforeFilter();
|
||||
$Controller->Component->startup($Controller);
|
||||
$Controller->Components->trigger('startup', array(&$Controller));
|
||||
|
||||
$this->assertTrue(is_a(
|
||||
$Controller->SomethingWithEmail,
|
||||
'SomethingWithEmailComponent'
|
||||
));
|
||||
$this->assertTrue(is_a(
|
||||
$Controller->SomethingWithEmail->Email,
|
||||
'EmailComponent'
|
||||
));
|
||||
$this->assertTrue(is_a(
|
||||
$Controller->SomethingWithEmail->Email->Controller,
|
||||
'ComponentTestController'
|
||||
));
|
||||
$this->assertType('SomethingWithEmailComponent', $Controller->SomethingWithEmail);
|
||||
$this->assertType('EmailComponent', $Controller->SomethingWithEmail->Email);
|
||||
$this->assertType('ComponentTestController', $Controller->SomethingWithEmail->Email->Controller);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue