[pLog-svn] r4308 - in plog/branches/lifetype-1.1.3/class: dao test/tests/dao

Oscar Renalias oscar at renalias.net
Thu Nov 16 07:49:42 GMT 2006


The problem is that you used '1' as the id of the dummy blog, '1' as
the id of the dummy user and so on, and those probably match with your
current blog and user :-)

The TestTools class (class/test/helpers/testtools.class.php) has some
useful methods for generating and deleting test data
TestTools::createBlog(), TestTools::createUser(), etc. I usually first
generate the test data in the LifetypeTestCase::setUp() method, delete
it in the tearDown() method and operate on it in the testXXX()
methods.

Otherwise the test case looks fine. You probably need to check if the
sorting options work by making two calls and see that you get the two
test comments that you added in different order depening on the order
you specify in the call (although you will probably need to use
different timestamps for each one of the comments)

On 11/16/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>         Ack.  Playing around with the tests totally messed up my blog.  I
> think my user was erased or no longer an owner of my blog or something.
> Fortunately, I made a backup just prior to working on it.
>         So, the tests run on the real host?  That seems kind of scary.
>
> On Thu, 16 Nov 2006, jondaley at devel.lifetype.net wrote:
> > Log: fixed comment ordering bug from a while ago.  Thanks for the
> > suggestion Mark - I wouldn't have known how to fix it.  Oscar - here is
> > a start on the test case - I don't really get how to do it.
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list