|
From: Anders A. <tr...@gm...> - 2014-06-07 06:45:21
|
Hey again.
I have studied the source now and found something that seems wrong.
In errors.php there is a tally method that loops through $this->queue and
paints all the errors.
But nothing is ever pushed to this queue.
So I added the following in testLatestError, in the else block.
array_push($this->queue, array($severity, $content, $filename,
$line));
Now I can hide the view output and I'm getting the error in a clean summary.
Did I find a bug here or have I missed something?
--Anders
On Fri, Jun 6, 2014 at 7:16 PM, Anders Andersson <tr...@gm...> wrote:
> I addressed this in my first mail.
> If I use an output buffer, that will hide the errors too since simpletest
> outputs directly to the same stream.
>
>
> One thought I had is to change simpletest to store all of its output until
> the test is over and then print it. That way, any output occuring during
> the test can be suppressed.
>
>
> On Fri, Jun 6, 2014 at 5:29 PM, Roy Ronalds <tch...@gm...> wrote:
>
>> Heh, generally you can simply capture output like that by using output
>> buffering. For example:
>>
>> ob_start();
>> // Do whatever is actually outputting the html to the command line
>> $html = ob_get_contents();
>> ob_end_clean();
>> // Do the rest of the testing.
>>
>> More on ob_start() here if you need it:
>> http://www.php.net//manual/en/function.ob-start.php
>>
>> --Roy
>>
>>
>> On Fri, Jun 6, 2014 at 10:43 AM, Anders Andersson <tr...@gm...>
>> wrote:
>>
>> > I am getting started testing a website and for most tests I want to run
>> the
>> > code that generates each webpage.
>> >
>> > My issue with this is that the webpage output is shown in the test
>> result,
>> > and any errors that occur get rendered by simpletest in the middle of
>> the
>> > page as they happen.
>> >
>> > If there's a good way to handle this I can't see it.
>> > I would like to not see the regular html output, I only want the errors.
>> > The page may be rendered in such a way that errors end up in an
>> invisible
>> > block, or some javascript gets triggered and messes up the test result
>> > page.
>> > I can hide the website content by trapping it in an output buffer, but
>> as
>> > it is now I won't see the errors because simpletest prints those to the
>> > same output.
>> >
>> > Any suggestions?
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Learn Graph Databases - Download FREE O'Reilly Book
>> > "Graph Databases" is the definitive new guide to graph databases and
>> their
>> > applications. Written by three acclaimed leaders in the field,
>> > this first edition is now available. Download your free book today!
>> > http://p.sf.net/sfu/NeoTech
>> > _______________________________________________
>> > Simpletest-support mailing list
>> > Sim...@li...
>> > https://lists.sourceforge.net/lists/listinfo/simpletest-support
>> >
>>
>>
>>
>> --
>> +++++++++++++++++++++++++++
>> BitLucid.com <http://bitlucid.com/> - BitLucid, Inc. - Web & Programming
>> Consultants
>> ninjawars.net - My webgame project
>> 585-519-7658 - Cell
>> "Never compare your inside with somebody's outside."
>>
>> ------------------------------------------------------------------------------
>> Learn Graph Databases - Download FREE O'Reilly Book
>> "Graph Databases" is the definitive new guide to graph databases and their
>> applications. Written by three acclaimed leaders in the field,
>> this first edition is now available. Download your free book today!
>> http://p.sf.net/sfu/NeoTech
>> _______________________________________________
>> Simpletest-support mailing list
>> Sim...@li...
>> https://lists.sourceforge.net/lists/listinfo/simpletest-support
>>
>
>
|