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
韩天峰 2 months ago
parent 492116d3c0
commit e966f0e941
  1. 9
      tests/compiler/var_convert/002.phpt

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

Loading…
Cancel
Save