Skip to content

Commit 0ff2216

Browse files
committed
feat: add printer tests
1 parent 2075fa4 commit 0ff2216

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
Pass short ctor parameters
3+
--FILE--
4+
<?php
5+
6+
try {
7+
assert(false && function () {
8+
class Empty0 ();
9+
});
10+
} catch (Throwable $e) {
11+
echo $e->getMessage(), PHP_EOL;
12+
}
13+
14+
?>
15+
--EXPECTF--
16+
assert(false && function () {
17+
class Empty0 {
18+
public function __construct() {
19+
}
20+
21+
}
22+
23+
})
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
Pass short ctor parameters
3+
--FILE--
4+
<?php
5+
6+
try {
7+
assert(false && function () {
8+
9+
class DTO (
10+
public int $number,
11+
);
12+
13+
});
14+
} catch (Throwable $e) {
15+
echo $e->getMessage(), PHP_EOL;
16+
}
17+
18+
?>
19+
--EXPECTF--
20+
assert(false && function () {
21+
class DTO {
22+
public function __construct(public int $number) {
23+
}
24+
25+
}
26+
27+
})

0 commit comments

Comments
 (0)