mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating behaviors tests
This commit is contained in:
parent
35dc82571a
commit
5f45dd20d2
1 changed files with 2 additions and 0 deletions
|
@ -454,12 +454,14 @@ class BehaviorCollectionTest extends CakeTestCase {
|
||||||
$this->assertEquals($Apple->Behaviors->dispatchMethod($Apple, 'testMethod'), 'working');
|
$this->assertEquals($Apple->Behaviors->dispatchMethod($Apple, 'testMethod'), 'working');
|
||||||
|
|
||||||
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
|
App::build(array('plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)));
|
||||||
|
CakePlugin::load('TestPlugin');
|
||||||
$this->assertTrue($Apple->Behaviors->load('SomeOther', array('className' => 'TestPlugin.TestPluginPersisterOne')));
|
$this->assertTrue($Apple->Behaviors->load('SomeOther', array('className' => 'TestPlugin.TestPluginPersisterOne')));
|
||||||
$this->assertInstanceOf('TestPluginPersisterOneBehavior', $Apple->Behaviors->SomeOther);
|
$this->assertInstanceOf('TestPluginPersisterOneBehavior', $Apple->Behaviors->SomeOther);
|
||||||
|
|
||||||
$result = $Apple->Behaviors->attached();
|
$result = $Apple->Behaviors->attached();
|
||||||
$this->assertEquals(array('Test', 'SomeOther'), $result, 'attached() results are wrong.');
|
$this->assertEquals(array('Test', 'SomeOther'), $result, 'attached() results are wrong.');
|
||||||
App::build();
|
App::build();
|
||||||
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue