refactor(tests): update stream write test with extension provider attribute

- Add ExtensionProvider attribute to StreamExtensions class
- Rename stream_write_test function to writeTest method
- Convert function to static method in StreamExtensions class
- Add proper class declaration and method signature
- Maintain original stream write functionality
pull/17/head
韩天峰 1 month ago
parent 492116d3c0
commit e966f0e941
  1. 9
      tests/compiler/var_convert/002.phpt

@ -8,8 +8,13 @@ if (PHP_OS_FAMILY != 'Linux') {
}
--FILE--
<?php
function stream_write_test(stream $stream) {
$stream->write('world');
#[ExtensionProvider(Type::Stream)]
final class StreamExtensions
{
public static function writeTest(stream $stream): void
{
$stream->write('world');
}
}
function main()

Loading…
Cancel
Save