mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating component tests
This commit is contained in:
parent
53037d90d6
commit
18b5b36b6f
2 changed files with 6 additions and 1 deletions
|
@ -157,7 +157,7 @@ class FormAuthenticateTest extends CakeTestCase {
|
|||
App::build(array(
|
||||
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
|
||||
), true);
|
||||
App::objects('plugin', null, false);
|
||||
CakePlugin::load('TestPlugin');
|
||||
|
||||
$PluginModel = ClassRegistry::init('TestPlugin.TestPluginAuthUser');
|
||||
$user['id'] = 1;
|
||||
|
@ -182,6 +182,7 @@ class FormAuthenticateTest extends CakeTestCase {
|
|||
'updated' => date('Y-m-d H:i:s')
|
||||
);
|
||||
$this->assertEquals($expected, $result);
|
||||
CakePlugin::unload();
|
||||
}
|
||||
|
||||
}
|
|
@ -85,6 +85,7 @@ class ComponentCollectionTest extends CakeTestCase {
|
|||
$this->assertInstanceOf('CookieAliasComponent', $result);
|
||||
|
||||
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
|
||||
CakePlugin::load('TestPlugin');
|
||||
$result = $this->Components->load('SomeOther', array('className' => 'TestPlugin.OtherComponent'));
|
||||
$this->assertInstanceOf('OtherComponentComponent', $result);
|
||||
$this->assertInstanceOf('OtherComponentComponent', $this->Components->SomeOther);
|
||||
|
@ -92,6 +93,7 @@ class ComponentCollectionTest extends CakeTestCase {
|
|||
$result = $this->Components->attached();
|
||||
$this->assertEquals(array('Cookie', 'SomeOther'), $result, 'attached() results are wrong.');
|
||||
App::build();
|
||||
CakePlugin::unload();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -125,10 +127,12 @@ class ComponentCollectionTest extends CakeTestCase {
|
|||
App::build(array(
|
||||
'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
|
||||
));
|
||||
CakePlugin::load('TestPlugin');
|
||||
$result = $this->Components->load('TestPlugin.OtherComponent');
|
||||
$this->assertInstanceOf('OtherComponentComponent', $result, 'Component class is wrong.');
|
||||
$this->assertInstanceOf('OtherComponentComponent', $this->Components->OtherComponent, 'Class is wrong');
|
||||
App::build();
|
||||
CakePlugin::unload();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue