Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Mention test requirement on bootstrap.php #1638

Merged
merged 1 commit into from
Sep 2, 2015
Merged

Conversation

RobinMcCorkell
Copy link

PHP unit tests require the ownCloud bootstrap to be loaded to register autoloader paths and environment variables. This is required for ownCloud 8.2

ref owncloud/core#18396 (comment) owncloud/core#18765 https://github.com/owncloud/ocdev/issues/38

cc @nickvergessen @icewind1991

@RobinMcCorkell RobinMcCorkell added this to the 8.2-current milestone Sep 2, 2015
@LukasReschke
Copy link
Contributor

👍

@@ -14,6 +14,12 @@ The PHP tests go into the **tests/** directory. Unfortunately the classloader in

phpunit tests/

When writing your own tests, please ensure that PHPUnit bootstraps from :file:`tests/bootstrap.php`, to set up various environment variables and autoloader registration correctly. Without this, you will see errors as the ownCloud autoloader security policy prevents access to the tests/ subdirectory. This can be configured in your :file:`phpunit.xml` file as follows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cores bootstrap is kind of bad:

OC_App::loadApps(array('authentication'));
OC_App::loadApps(array('filesystem', 'logging'));

Anyway sounds good

RobinMcCorkell pushed a commit that referenced this pull request Sep 2, 2015
Mention test requirement on bootstrap.php
@RobinMcCorkell RobinMcCorkell merged commit 2302fa8 into master Sep 2, 2015
@RobinMcCorkell RobinMcCorkell deleted the test-bootstrap branch September 2, 2015 14:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants