I’m trying to set up the development environment of the Calendar app. After installing composer and following the instructions of GitHub - nextcloud/calendar: 📆 Calendar app for Nextcloud, I run composer test. I get this error right away:
PHP Warning: require_once([REDACTED]/calendar/tests/php/unit/…/…/…/…/…/lib/base.php): Failed to open stream: No such file or directory in [REDACTED]/calendar/tests/php/unit/bootstrap.php on line 26
It looks like the path in the error makes some unclarified assumptions about where the repository should be, as all these ../../ take us outside the repo. Additionally, I searched my entire filesystem and didn’t find a base.php file. I’ve installed php.
How can I find base.php and make bootrstrap.php see it properly?
I am not sure that you need a full installation. In any case, you need a server dev environment, aka a git checkout not only a tarball from the homepage. The tarball has some files (like the test files) filtered out. These are only present in the git repository.
The app under consideration (like the calendar app in your case) must reside in a folder 1 folder below the checked out server repo. For example, you need to check out to e.g. apps/calendar or custom_apps/calendar. Then, the paths to the base.php and similar should be found correctly.
Regarding the user to run the tests, I would suggest, to checkout both the server and the calendar app as your main user. Then, the tests can be run as your normal user.