Skip to content

Commit

Permalink
Fix EntityTrait::__debugInfo doesn't show the actual accessible property
Browse files Browse the repository at this point in the history
  • Loading branch information
chinpei215 committed Feb 22, 2017
1 parent 12e8376 commit 8097272
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Datasource/EntityTrait.php
Expand Up @@ -1232,7 +1232,7 @@ public function __debugInfo()
{
return $this->_properties + [
'[new]' => $this->isNew(),
'[accessible]' => array_filter($this->_accessible),
'[accessible]' => $this->_accessible,
'[dirty]' => $this->_dirty,
'[original]' => $this->_original,
'[virtual]' => $this->_virtual,
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/ORM/EntityTest.php
Expand Up @@ -1379,6 +1379,7 @@ public function testDebugInfo()
{
$entity = new Entity(['foo' => 'bar'], ['markClean' => true]);
$entity->somethingElse = 'value';
$entity->accessible('id', false);
$entity->accessible('name', true);
$entity->virtualProperties(['baz']);
$entity->dirty('foo', true);
Expand All @@ -1390,7 +1391,7 @@ public function testDebugInfo()
'foo' => 'bar',
'somethingElse' => 'value',
'[new]' => true,
'[accessible]' => ['*' => true, 'name' => true],
'[accessible]' => ['*' => true, 'id' => false, 'name' => true],
'[dirty]' => ['somethingElse' => true, 'foo' => true],
'[original]' => [],
'[virtual]' => ['baz'],
Expand Down

0 comments on commit 8097272

Please sign in to comment.