[Owncloud] Making internal methods public for unit testing

Sam Tuke samtuke at owncloud.com
Tue Jun 12 17:24:27 UTC 2012


On Monday 04 June 2012 12:53:02 Frank Karlitschek wrote:
> > What are you testing, if it is the core, why not use the core OC_ classes?

I'm testing the files_versions app. In order to test any functionality that 
interacts with users, a dummy backend for the User class must be loaded.

> Same question from me. I donĀ“t think we should make our public API bigger
> than needed only because we want to use unit tests.

If we want apps to have unit tests, then any part of OC which must be accessed 
for the writing of tests should be in the public namespace. It seems to me 
that OCP\User class is just as public as any other class that needs access for 
the testing of an app.

Best,

Sam.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20120612/a7206234/attachment.sig>


More information about the Owncloud mailing list