mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Fix failing test in Debugger test case.
This commit is contained in:
parent
3b57704a27
commit
e9779e7126
2 changed files with 13 additions and 9 deletions
|
@ -302,6 +302,7 @@ class DebuggerTest extends CakeTestCase {
|
||||||
$expected = <<<TEXT
|
$expected = <<<TEXT
|
||||||
object(View) {
|
object(View) {
|
||||||
Helpers => object(HelperCollection) {}
|
Helpers => object(HelperCollection) {}
|
||||||
|
Blocks => object(ViewBlock) {}
|
||||||
plugin => null
|
plugin => null
|
||||||
name => ''
|
name => ''
|
||||||
passedArgs => array()
|
passedArgs => array()
|
||||||
|
@ -322,15 +323,14 @@ object(View) {
|
||||||
validationErrors => array()
|
validationErrors => array()
|
||||||
hasRendered => false
|
hasRendered => false
|
||||||
uuids => array()
|
uuids => array()
|
||||||
output => false
|
|
||||||
request => null
|
request => null
|
||||||
elementCache => 'default'
|
elementCache => 'default'
|
||||||
int => (int) 2
|
int => (int) 2
|
||||||
float => (float) 1.333
|
float => (float) 1.333
|
||||||
}
|
}
|
||||||
TEXT;
|
TEXT;
|
||||||
$result = str_replace(array("\r\n", "\n"), "", $result);
|
// $result = str_replace(array("\r\n", "\n"), "", $result);
|
||||||
$expected = str_replace(array("\r\n", "\n"), "", $expected);
|
// $expected = str_replace(array("\r\n", "\n"), "", $expected);
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -393,12 +393,12 @@ class View extends Object {
|
||||||
if (!$this->_helpersLoaded) {
|
if (!$this->_helpersLoaded) {
|
||||||
$this->loadHelpers();
|
$this->loadHelpers();
|
||||||
}
|
}
|
||||||
$this->output = '';
|
$this->Blocks->set('content', '');
|
||||||
|
|
||||||
if ($view !== false && $viewFileName = $this->_getViewFileName($view)) {
|
if ($view !== false && $viewFileName = $this->_getViewFileName($view)) {
|
||||||
$this->_currentType = self::TYPE_VIEW;
|
$this->_currentType = self::TYPE_VIEW;
|
||||||
$this->Helpers->trigger('beforeRender', array($viewFileName));
|
$this->Helpers->trigger('beforeRender', array($viewFileName));
|
||||||
$this->output = $this->_render($viewFileName);
|
$this->Blocks->set('content', $this->_render($viewFileName));
|
||||||
$this->Helpers->trigger('afterRender', array($viewFileName));
|
$this->Helpers->trigger('afterRender', array($viewFileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -406,10 +406,10 @@ class View extends Object {
|
||||||
$layout = $this->layout;
|
$layout = $this->layout;
|
||||||
}
|
}
|
||||||
if ($layout && $this->autoLayout) {
|
if ($layout && $this->autoLayout) {
|
||||||
$this->output = $this->renderLayout('', $layout);
|
$this->Blocks->set('content', $this->renderLayout('', $layout));
|
||||||
}
|
}
|
||||||
$this->hasRendered = true;
|
$this->hasRendered = true;
|
||||||
return $this->output;
|
return $this->Blocks->get('content');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -462,10 +462,10 @@ class View extends Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_currentType = self::TYPE_LAYOUT;
|
$this->_currentType = self::TYPE_LAYOUT;
|
||||||
$this->output = $this->_render($layoutFileName);
|
$this->Blocks->set('content', $this->_render($layoutFileName));
|
||||||
|
|
||||||
$this->Helpers->trigger('afterLayout', array($layoutFileName));
|
$this->Helpers->trigger('afterLayout', array($layoutFileName));
|
||||||
return $this->output;
|
return $this->Blocks->get('content');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -717,6 +717,8 @@ class View extends Object {
|
||||||
return $this->request;
|
return $this->request;
|
||||||
case 'output':
|
case 'output':
|
||||||
return $this->Blocks->get('content');
|
return $this->Blocks->get('content');
|
||||||
|
default:
|
||||||
|
return $this->{$name};
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -732,6 +734,8 @@ class View extends Object {
|
||||||
switch ($name) {
|
switch ($name) {
|
||||||
case 'output':
|
case 'output':
|
||||||
return $this->Blocks->set('content', $value);
|
return $this->Blocks->set('content', $value);
|
||||||
|
default:
|
||||||
|
$this->{$name} = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue