Skip to content

Commit e772b3d

Browse files
committed
Add test for readonly classes emitted in PHP 8.3
1 parent 07dd3b4 commit e772b3d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php namespace lang\ast\unittest\emit;
2+
3+
use lang\ast\emit\Type;
4+
use test\{Assert, Test};
5+
6+
class PHP83Test extends EmittingTest {
7+
8+
/** @return string */
9+
protected function runtime() { return 'php:8.3.0'; }
10+
11+
#[Test]
12+
public function readonly_classes() {
13+
Assert::matches(
14+
'/readonly class [A-Z0-9]+{/',
15+
$this->emit('readonly class %T { }')
16+
);
17+
}
18+
}

0 commit comments

Comments
 (0)