11<?php namespace lang \ast \syntax \php \unittest ;
22
33use lang \ast \unittest \emit \EmittingTest ;
4- use lang \{Primitive , Nullable , ArrayType , MapType , TypeUnion , FunctionType , IllegalArgumentException };
5- use unittest \{Assert , Test , Values };
4+ use lang \{ArrayType , FunctionType , IllegalArgumentException , MapType , Nullable , Primitive , TypeUnion };
5+ use test \{Assert , Expect , Test , Values };
66
77class GenericsTest extends EmittingTest {
88
@@ -207,7 +207,7 @@ public function run() {
207207 Assert::equals (['A ' , 'B ' ], $ r ->remaining ());
208208 }
209209
210- #[Test, Expect(class: IllegalArgumentException::class, withMessage : '/Argument 1 .+ must be of string, int given/ ' )]
210+ #[Test, Expect(class: IllegalArgumentException::class, message : '/Argument 1 .+ must be of string, int given/ ' )]
211211 public function incorrect_parameter_type () {
212212 $ this ->run ('class <T><E> {
213213 public function push(E $element) { /* Never run */ }
@@ -218,7 +218,7 @@ public function run() {
218218 } ' );
219219 }
220220
221- #[Test, Expect(class: IllegalArgumentException::class, withMessage : '/Vararg 1 .+ must be of string.*, var.* given/ ' )]
221+ #[Test, Expect(class: IllegalArgumentException::class, message : '/Vararg 1 .+ must be of string.*, var.* given/ ' )]
222222 public function incorrect_variadic_parameter_type () {
223223 $ this ->run ('class <T><E> {
224224 public function push(E... $elements) { /* Never run */ }
@@ -229,7 +229,7 @@ public function run() {
229229 } ' );
230230 }
231231
232- #[Test, Expect(class: IllegalArgumentException::class, withMessage : '/Argument 1 .+ must be of .+, .+ given/ ' )]
232+ #[Test, Expect(class: IllegalArgumentException::class, message : '/Argument 1 .+ must be of .+, .+ given/ ' )]
233233 public function incorrect_function_type () {
234234 $ this ->run ('class <T><E> {
235235 public function comparing(function(E, E): int $comparator) { /* Never run */ }
0 commit comments