Skip to content
Permalink
Browse files

Remove use of undefined property from Cell::__debugInfo()

Refs #12186
  • Loading branch information...
markstory committed Jun 5, 2018
1 parent 68b3636 commit 2203e0db444457d6a98e471670e4a6639c993d89
Showing with 17 additions and 1 deletion.
  1. +0 −1 src/View/Cell.php
  2. +17 −0 tests/TestCase/View/CellTest.php
@@ -304,7 +304,6 @@ public function __debugInfo()
'action' => $this->action,
'args' => $this->args,
'template' => $this->template,
'viewClass' => $this->viewClass,
'request' => $this->request,
'response' => $this->response,
];
@@ -85,6 +85,23 @@ public function testCellRender()
$this->assertEquals("Cellos\n", $cell->render());
}
/**
* Tests debug output.
*
* @return void
*/
public function testDebugInfo()
{
$cell = $this->View->cell('Articles::teaserList');
$data = $cell->__debugInfo();
$this->assertArrayHasKey('plugin', $data);
$this->assertArrayHasKey('request', $data);
$this->assertArrayHasKey('response', $data);
$this->assertEquals('teaserList', $data['action']);
$this->assertEquals('teaser_list', $data['template']);
$this->assertEquals([], $data['args']);
}
/**
* Test __toString() hitting an error when rendering views.
*

0 comments on commit 2203e0d

Please sign in to comment.
You can’t perform that action at this time.