[buddypress-trac] [BuddyPress] #4470: BuddyPress Singleton

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Aug 28 02:01:50 UTC 2012


#4470: BuddyPress Singleton
------------------------------+------------------------------
 Reporter:  johnjamesjacoby   |       Owner:  johnjamesjacoby
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  1.7
Component:  Core              |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+------------------------------

Comment (by foxly):

 I wasn't talking about the specific PHP code in the patch, I was talking
 about the design philosophy implied by the source code comment.

 Making vars and methods private will cause you EPIC problems. Since PHP
 has no concept of "friends" like the C language family, there's no way for
 unit test code to "tamper" with a class' internal variables as part of the
 test process. It can also cause frustrating problems with debugging,
 because variables you think should be there are "invisible".

 Build-out your unit tests with Razor. When you're done (and you actually
 have tests with decent code coverage) its unlikely you'll still be so keen
 on locking-down BP's classes.

 -F

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


More information about the buddypress-trac mailing list