Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified TypeProcessor #16275

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions lib/internal/Magento/Framework/Reflection/Test/Unit/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*/
namespace Magento\Framework\Reflection\Test\Unit;

use Magento\Framework\Reflection\Test\Unit\Fixture\TSampleInterface;

/**
* Dummy data object to be used by TypeProcessorTest
*/
Expand All @@ -13,18 +15,23 @@ class DataObject
/**
* @var string
*/
protected $attrName;
private $attrName;

/**
* @var bool
*/
protected $isActive;
private $isActive;

/**
* @var string
*/
private $name;

/**
* @var array
*/
private $data = [];

/**
* @return string
*/
Expand Down Expand Up @@ -70,4 +77,32 @@ public function setName($name = null)
$this->name = $name;
return $this;
}

/**
* @param string $key Key is used as index
* @param string $value
* @return void
*/
public function setData(string $key, string $value)
{
$this->data[$key] = $value;
}

/**
* @param array $data
* @return void
*/
public function addData(array $data)
{
$this->data = $data;
}

/**
* @param TSampleInterface[] $list
* @return void
*/
public function addObjectList(array $list)
{
$this->data['objects'] = $list;
}
}
Loading