-
-
Notifications
You must be signed in to change notification settings - Fork 467
/
oo.zep
114 lines (93 loc) · 1.58 KB
/
oo.zep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/**
* OO operations
*/
namespace Stub;
class Oo
{
public function testInstance1()
{
var o;
let o = new \stdClass;
return o;
}
public function testInstance2()
{
var o;
let o = new Oo\OoConstruct;
return o;
}
public function testInstance3()
{
var o;
let o = new Oo\OoNoConstruct;
return o;
}
public function testInstance4()
{
var o, a, b;
let a = "a",
b = "b",
o = new Oo\OoConstructParams(a, b);
return o;
}
public function testInstance5()
{
var o;
let o = new Oo\OoConstructParams("a", "b");
return o;
}
public function testInstance6()
{
var o;
let o = new Oo\OoConstructParams(1, 2);
return o;
}
public function testInstance7()
{
var o;
let o = new Oo\OoConstructParams(false, true);
return o;
}
public function testInstance8()
{
var o;
let o = new Oo\OoConstructParams(1.2, 7.30);
return o;
}
public function testInstance9()
{
var o;
let o = Oo\OoDynamicA::getNew();
return o;
}
public function testInstance10()
{
var o;
let o = Oo\OoDynamicB::getNew();
return o;
}
public function testInstance11()
{
var o;
let o = new Oo\OoConstructParams(1, 2);
return o;
}
public function testInstance12()
{
var o;
let o = Oo\OoDynamicA::call1();
return o;
}
public function createInstancesInLoop() -> array
{
var className, instance, fqcn;
array result = [];
for className in ["OoDynamicA", "OoDynamicB"] {
let fqcn = "Stub\\Oo\\" . className;
let instance = new {fqcn}();
let result[] = instance->execute();
let result[] = instance->execute2();
}
return result;
}
}