xref: /php-src/ext/libxml/tests/bug54138.phpt (revision 74859783)
1--TEST--
2Bug #54138 - DOMNode::getLineNo() doesn't return line number higher than 65535
3--EXTENSIONS--
4dom
5--SKIPIF--
6<?php
7if (!defined('LIBXML_BIGLINES')) die('skip this test requires LIBXML_BIGLINES');
8?>
9--FILE--
10<?php
11$foos = str_repeat('<foo/>' . PHP_EOL, 65535);
12$xml = <<<XML
13<?xml version="1.0" encoding="UTF-8"?>
14<root>
15$foos
16<bar/>
17</root>
18XML;
19$dom = new DOMDocument();
20$dom->loadXML($xml, LIBXML_BIGLINES);
21var_dump($dom->getElementsByTagName('bar')->item(0)->getLineNo());
22?>
23--EXPECT--
24int(65540)
25