Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing fails caused by PHP4 and all lowercase classnames.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8278 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit bab62df0d8e5f1ea388146abb11a10094b88dcb5 1 parent 401796e
Mark Story markstory authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 cake/tests/cases/libs/model/behavior.test.php
16 cake/tests/cases/libs/model/behavior.test.php
View
@@ -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
@@ -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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.