File tree Expand file tree Collapse file tree 3 files changed +205
-107
lines changed
lib/internal/Magento/Framework/Reflection Expand file tree Collapse file tree 3 files changed +205
-107
lines changed Original file line number Diff line number Diff line change 55 */
66namespace Magento \Framework \Reflection \Test \Unit ;
77
8+ use Magento \Framework \Reflection \Test \Unit \Fixture \TSampleInterface ;
9+
810/**
911 * Dummy data object to be used by TypeProcessorTest
1012 */
@@ -13,18 +15,23 @@ class DataObject
1315 /**
1416 * @var string
1517 */
16- protected $ attrName ;
18+ private $ attrName ;
1719
1820 /**
1921 * @var bool
2022 */
21- protected $ isActive ;
23+ private $ isActive ;
2224
2325 /**
2426 * @var string
2527 */
2628 private $ name ;
2729
30+ /**
31+ * @var array
32+ */
33+ private $ data = [];
34+
2835 /**
2936 * @return string
3037 */
@@ -70,4 +77,32 @@ public function setName($name = null)
7077 $ this ->name = $ name ;
7178 return $ this ;
7279 }
80+
81+ /**
82+ * @param string $key Key is used as index
83+ * @param string $value
84+ * @return void
85+ */
86+ public function setData (string $ key , string $ value )
87+ {
88+ $ this ->data [$ key ] = $ value ;
89+ }
90+
91+ /**
92+ * @param array $data
93+ * @return void
94+ */
95+ public function addData (array $ data )
96+ {
97+ $ this ->data = $ data ;
98+ }
99+
100+ /**
101+ * @param TSampleInterface[] $list
102+ * @return void
103+ */
104+ public function addObjectList (array $ list )
105+ {
106+ $ this ->data ['objects ' ] = $ list ;
107+ }
73108}
You can’t perform that action at this time.
0 commit comments