Skip to content

Commit

Permalink
Fixing fails caused by PHP4 and all lowercase classnames.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8278 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
markstory committed Aug 3, 2009
1 parent 401796e commit bab62df
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cake/tests/cases/libs/model/behavior.test.php
Expand Up @@ -265,8 +265,8 @@ function onError(&$model) {
* @return void
*/
function beforeTest(&$model) {
$model->beforeTestResult[] = get_class($this);
return get_class($this);
$model->beforeTestResult[] = strtolower(get_class($this));
return strtolower(get_class($this));
}
/**
* testMethod method
Expand Down Expand Up @@ -983,24 +983,24 @@ function testBehaviorMethodDispatchingWithData() {
* @return void
*/
function testBehaviorTrigger() {
$Apple = new Apple();
$Apple =& new Apple();
$Apple->Behaviors->attach('Test');
$Apple->Behaviors->attach('Test2');
$Apple->Behaviors->attach('Test3');

$Apple->beforeTestResult = array();
$Apple->Behaviors->trigger($Apple, 'beforeTest');
$expected = array('TestBehavior', 'Test2Behavior', 'Test3Behavior');
$expected = array('testbehavior', 'test2behavior', 'test3behavior');
$this->assertIdentical($Apple->beforeTestResult, $expected);

$Apple->beforeTestResult = array();
$Apple->Behaviors->trigger($Apple, 'beforeTest', array(), array('break' => true, 'breakOn' => 'Test2Behavior'));
$expected = array('TestBehavior', 'Test2Behavior');
$Apple->Behaviors->trigger($Apple, 'beforeTest', array(), array('break' => true, 'breakOn' => 'test2behavior'));
$expected = array('testbehavior', 'test2behavior');
$this->assertIdentical($Apple->beforeTestResult, $expected);

$Apple->beforeTestResult = array();
$Apple->Behaviors->trigger($Apple, 'beforeTest', array(), array('break' => true, 'breakOn' => array('Test2Behavior', 'Test3Behavior')));
$expected = array('TestBehavior', 'Test2Behavior');
$Apple->Behaviors->trigger($Apple, 'beforeTest', array(), array('break' => true, 'breakOn' => array('test2behavior', 'test3behavior')));
$expected = array('testbehavior', 'test2behavior');
$this->assertIdentical($Apple->beforeTestResult, $expected);
}
/**
Expand Down

0 comments on commit bab62df

Please sign in to comment.