Re: first php 5 class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/30/08, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote:
> On Jan 30, 2008 2:55 PM, Greg Donald <gdonald@xxxxxxxxx> wrote:
> > If you only need to test data integrity then it seems good enough.  I
> > would argue that being able to test xhr requests is a basic
> > requirement at this stage in web development.
>
> how exactly do you test an xhr request?
> my suspicion is that you would just set data in superglobal
> arrays, eg.
> $_POST['somevar'] = ' blah';
>
> i dont really see what the difference between an xhr request
> and a non-xhr request is in the context of a unit test.
> its still http..

A unit test, in it's most general sense, has nothing to do with http
specifically, it's just model/data validation for small units of code.
 It's answers the question "Does my model read and write records to
and from the database correctly?".  It won't catch integration errors,
performance problems, or other system-wide issues not local to the
unit being tested.

An xhr request needs to be tested to see if your javascript fired when
expected and equally important what was sent back, and did what was
sent back land in the DOM where you expected it to.  Rails provides
that and much more.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux