php-src/ext/mysqli/tests/mysqli_driver/write_property.phpt
George Peter Banyard 6a4031b8c4
ext/mysqli: Work on making tests parallizable (#11814)
Batch 1 of amending tests, so they can run in parallel.

Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
2023-09-29 18:57:30 +01:00

28 lines
546 B
PHP

--TEST--
Writing to mysqli_driver properties
--EXTENSIONS--
mysqli
--FILE--
<?php
$driver = new mysqli_driver;
try {
/* Read-only property */
$driver->client_info = 'test';
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
$driver->report_mode = "1";
var_dump($driver->report_mode);
try {
$driver->report_mode = [];
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot write read-only property mysqli_driver::$client_info
int(1)
Cannot assign array to property mysqli_driver::$report_mode of type int