[Owncloud] Unit Testing an App -- app can't find appframework

Sarah Jones sarah.e.p.jones at gmail.com
Thu Jan 24 23:20:03 UTC 2013


Hi,

I've copied the apptemplate_advanced and started on my app.  I've 
enabled the AppFramework and my app in my owncloud install.

I based my FriendshipMapper class off of the ItemMapper class in the 
apptemplate_advanced.  I am basing FriendshipMapperTest off of the 
appframework MapperTest (since there were no db unit tests samples in  
apptemplate or apptemplate_advanced).

When I try to run my test for my mapper class (e.g. `phpunit 
tests/friendship/FriendshipMapperTest.php`), I get
PHP Fatal error:  Class 'OCA\AppFramework\Mapper' not found in 
/home/sjones/public_html/dev/myapps/friends/database/friendship.mapper.php 
on line 26

Line 26 of friendship.mapper.php is
class FriendshipMapper extends \OCA\AppFramework\Mapper {

http://doc.owncloud.org/server/5.0/developer_manual/tutorial.html#unittests 
says that the app tests should be app to run in isolation from the 
owncloud instance with just the appframework.

How should the my app know where the appframework is?

Thanks,
~Sarah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130124/fbb79092/attachment.html>


More information about the Owncloud mailing list