JSimpleXML questions

6 views
Skip to first unread message

Paladin

unread,
Nov 6, 2009, 1:19:34 AM11/6/09
to Joomla! Framework Development
Running into some ignored method arguments here, at least the comment
says they're "currently ignored" so they're declared that way. But why
should they even *be* there?

Similar question about the entire importDOM method, since it does
absolutely nothing that I can see except return false.

Final, generic testing question: Only line in this I haven't been able
to test, yet, is the one after discovering xml_parser_create() doesn't
exist. Any idea how I can convince it not to exist for one run of
phpunit?

Niels Braczek

unread,
Nov 6, 2009, 2:29:31 AM11/6/09
to joomla-dev...@googlegroups.com
Paladin schrieb:

> Final, generic testing question: Only line in this I haven't been able
> to test, yet, is the one after discovering xml_parser_create() doesn't
> exist. Any idea how I can convince it not to exist for one run of
> phpunit?

The only way I know is runkit:
http://de2.php.net/manual/en/function.runkit-function-remove.php

Regards,
Niels

Ian MacLennan

unread,
Nov 6, 2009, 8:57:43 AM11/6/09
to joomla-dev...@googlegroups.com

You had much success with runkit? Last time I tried it I get a segfault.

Ian

Niels Braczek

unread,
Nov 6, 2009, 10:22:06 AM11/6/09
to joomla-dev...@googlegroups.com
Ian MacLennan schrieb:
> Niels Braczek wrote:

> You had much success with runkit? Last time I tried it I get a segfault.

I have not tried it yet, I only identified runkit as a necessary tool
for some kind of tests.

Regards,
Niels

--
| http://www.kolleg.de · Das Portal der Kollegs in Deutschland |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------

Ian MacLennan

unread,
Nov 6, 2009, 10:30:39 AM11/6/09
to joomla-dev...@googlegroups.com
Okay.  I looked into runkit when trying to figure out how to solve some challenging issues (mainly, since PHPUnit runs all tests in one process, how do you have both mock classes for code isolation purposes as well as test real classes without redefining classes - the answer was to use PHPUnit's new runInSeparateProcess annotation that was introduced in 3.4 and fixed for data provider tests in 3.4.1.)

It does look like runkit is necessary in this case.

Ian

Ian MacLennan

unread,
Nov 6, 2009, 10:34:33 AM11/6/09
to joomla-dev...@googlegroups.com
My guess is that these currently ignored and non-productive methods are there to maintain consistency with http://ca.php.net/simplexml so that we could just use those as a drop-in replacement when we were on PHP 5 (which is now, where it wasn't in Joomla 1.5).

Ian

Paladin

unread,
Nov 6, 2009, 11:41:09 AM11/6/09
to Joomla! Framework Development


On Nov 6, 9:34 am, Ian MacLennan <ian.maclen...@joomla.org> wrote:
> My guess is that these currently ignored and non-productive methods are
> there to maintain consistency withhttp://ca.php.net/simplexmlso that we
> could just use those as a drop-in replacement when we were on PHP 5 (which
> is now, where it wasn't in Joomla 1.5).

Thank you for the runkit pointer, guys. I'll take a look.

So are we saying this entire file isn't used anymore, unless we're
running php4?
Reply all
Reply to author
Forward
0 new messages