[buddypress-trac] [BuddyPress] #3567: Unit Testing for BuddyPress!

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sat Sep 10 07:18:17 UTC 2011


#3567: Unit Testing for BuddyPress!
-------------------------+------------------------------
 Reporter:  foxly        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Core         |     Version:  1.5
 Severity:  major        |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by foxly):

 Yes, by all means take our code and put it in your core! ...that's how
 open-source works, right ... :)

 You can also probably save many, many hours of dev time by using BP-
 Media's unit tests as design patterns for your own test code. We've
 already done a ton of the heavy-lifting, building code that spins test
 arrays and database results into structures that PHPUnit's "assertX"
 functions work with.

 You can grab them at this link: http://code.google.com/p/buddypress-
 media/source/browse/#svn%2Fbp_media%2Ftrunk%2Funit-test%2Fbpm-testcase

 Also, be sure to heavily document your unit tests. Remember, you're
 effectively creating *working examples* demonstrating the use of *every*
 function in BuddyPress. If you document them well, you can literally "cut-
 and-paste" them into your codex as documentation!

 Here's an example from the (partially completed) BP-Media codex:

 http://code.google.com/p/buddypress-
 media/wiki/DOCS_BPM_db_select_runSelectQuery

 We'd like to get together with you in Google+ video chat sometime next
 week to run you through using the Unit Test framework. It should take less
 than an hour. Perhaps after Wednesday's dev meeting would be most
 convenient?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3567#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list