File tree 3 files changed +203
-105
lines changed
lib/internal/Magento/Framework/Reflection
3 files changed +203
-105
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Framework \Reflection \Test \Unit ;
7
7
8
+ use Magento \Framework \Reflection \Test \Unit \Fixture \TSampleInterface ;
9
+
8
10
/**
9
11
* Dummy data object to be used by TypeProcessorTest
10
12
*/
@@ -13,18 +15,23 @@ class DataObject
13
15
/**
14
16
* @var string
15
17
*/
16
- protected $ attrName ;
18
+ private $ attrName ;
17
19
18
20
/**
19
21
* @var bool
20
22
*/
21
- protected $ isActive ;
23
+ private $ isActive ;
22
24
23
25
/**
24
26
* @var string
25
27
*/
26
28
private $ name ;
27
29
30
+ /**
31
+ * @var array
32
+ */
33
+ private $ data = [];
34
+
28
35
/**
29
36
* @return string
30
37
*/
@@ -70,4 +77,32 @@ public function setName($name = null)
70
77
$ this ->name = $ name ;
71
78
return $ this ;
72
79
}
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
+ }
73
108
}
You can’t perform that action at this time.
0 commit comments