@@ -109,6 +109,10 @@ Assert::exception(function () {
109
109
new Nette \PhpGenerator \Property ('* ' );
110
110
}, Nette \InvalidArgumentException::class);
111
111
112
+ Assert::exception (function () {
113
+ (new Nette \PhpGenerator \Property ('foo ' ))->setType ('a b ' );
114
+ }, Nette \InvalidArgumentException::class);
115
+
112
116
113
117
Assert::noError (function () {
114
118
new Nette \PhpGenerator \Parameter ('Iñtërnâtiônàlizætiøn ' );
@@ -130,6 +134,10 @@ Assert::exception(function () {
130
134
new Nette \PhpGenerator \Parameter ('$test ' );
131
135
}, Nette \InvalidArgumentException::class);
132
136
137
+ Assert::exception (function () {
138
+ (new Nette \PhpGenerator \Parameter ('foo ' ))->setType ('a b ' );
139
+ }, Nette \InvalidArgumentException::class);
140
+
133
141
134
142
Assert::noError (function () {
135
143
new Nette \PhpGenerator \Method ('Iñtërnâtiônàlizætiøn ' );
@@ -147,6 +155,10 @@ Assert::exception(function () {
147
155
new Nette \PhpGenerator \Method ('* ' );
148
156
}, Nette \InvalidArgumentException::class);
149
157
158
+ Assert::exception (function () {
159
+ (new Nette \PhpGenerator \Method ('foo ' ))->setReturnType ('a b ' );
160
+ }, Nette \InvalidArgumentException::class);
161
+
150
162
151
163
Assert::noError (function () {
152
164
new Nette \PhpGenerator \GlobalFunction ('Iñtërnâtiônàlizætiøn ' );
0 commit comments