1--TEST--
2Test property write errors
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7require_once("dom_test.inc");
8
9$dom = new DOMDocument();
10
11try {
12    $dom->nodeValue = [];
13} catch (TypeError $exception) {
14    echo $exception->getMessage() . "\n";
15}
16
17try {
18    $dom->nodeType += 1;
19} catch (Error $exception) {
20    echo $exception->getMessage() . "\n";
21}
22
23try {
24    $dom->xmlEncoding = null;
25} catch (Error $exception) {
26    echo $exception->getMessage() . "\n";
27}
28
29$entity = new DOMEntity();
30
31try {
32    $entity->actualEncoding = null;
33} catch (Error $exception) {
34    echo $exception->getMessage() . "\n";
35}
36
37try {
38    $entity->encoding = null;
39} catch (Error $exception) {
40    echo $exception->getMessage() . "\n";
41}
42
43try {
44    $entity->version = null;
45} catch (Error $exception) {
46    echo $exception->getMessage() . "\n";
47}
48
49?>
50--EXPECT--
51Cannot assign array to property DOMNode::$nodeValue of type ?string
52Cannot write read-only property DOMDocument::$nodeType
53Cannot write read-only property DOMDocument::$xmlEncoding
54Cannot write read-only property DOMEntity::$actualEncoding
55Cannot write read-only property DOMEntity::$encoding
56Cannot write read-only property DOMEntity::$version
57