Aren't you supposed to write <textarea> like this:
<textarea name="bug" id="bug"
rows="10"
cols="60"></textarea>
On 6/9/07, Travis Snoozy <ai2097 users.sourceforge.net>
wrote:
> Hey there,
>
> DomTestCase uses loadHTML to set up the DOM. However,
this
> sometimes throws exceptions when I attempt an
assertElementsBySelector
> against a perfectly valid XHTML 1.0 Transitional pages.
Specifically,
> there is a problem when loading a page with an element
of the following
> form:
>
> <textarea id="same" name="same"
/>
>
> The <input> tag doesn't have this problem, but
many other tags do.
> Removing the name makes the error go away, as does
setting
> loadExternals to true and calling loadXML. This smells
like a PHP bug,
> but it hurts simpletest functionality either way
(getting a zillion
> spurious "exception" notices at the end of a
run isn't a very pleasant
> experience).
>
> I've switched to loading XML and performing validation
with my local
> DomTestCase as a workaround for the time being.
>
>
> test.php:
> ---------
>
> <?php
>
> $dom = new DomDocument();
> $dom->loadHTMLFile('test.html');
>
> ?>
>
>
>
> test.html:
> ----------
>
> <?xml version="1.0"
encoding="UTF-8"?>
> <!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quo
t;>
> <html xmlns="http://www.w3.org/
1999/xhtml" xml:lang="en"
lang="en">
> <head>
> <title>Test</title>
> </head>
> <body>
> <p>
> <a href="#" name="anotherbug"
id="anotherbug">Woot!</a>
> </p>
> <form action=""
method="post">
> <p>
> <input type="text" id="notabug"
name="notabug" />
> <textarea name="bug" id="bug"
rows="10" cols="60" />
> <button type="submit"
id="yetanotherbug" name="yetanotherbug"
/>
> </p>
> </form>
> </body>
> </html>
>
>
> Output:
> -------
>
> Warning: DOMDocument::loadHTMLFile(): ID anotherbug
already defined in
> test.html, line: 11
> in
/home/blazer/src/in-series-svn/in-series-test/test.php on
line 4
>
> Warning: DOMDocument::loadHTMLFile(): ID bug already
defined in
> test.html, line: 16
> in
/home/blazer/src/in-series-svn/in-series-test/test.php on
line 4
>
> Warning: DOMDocument::loadHTMLFile(): ID yetanotherbug
already defined
> in test.html, line: 17
> in
/home/blazer/src/in-series-svn/in-series-test/test.php on
line 4
>
>
>
> --
> Travis
>
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2
express and take
> control of your XML. No limits. Just data. Click to get
it now.
> http://sourcefor
ge.net/powerbar/db2/
> _______________________________________________
> Simpletest-support mailing list
> Simpletest-support lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/simp
letest-support
>
------------------------------------------------------------
-------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and
take
control of your XML. No limits. Just data. Click to get it
now.
http://sourcefor
ge.net/powerbar/db2/
_______________________________________________
Simpletest-support mailing list
Simpletest-support lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simp
letest-support
|