Skip to content

Commit

Permalink
Merge branch 'master' into document-files-transfer-ownership-in-10.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
settermjd authored Apr 6, 2020
2 parents 1b40fb5 + 5210992 commit 0add10b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -660,13 +660,6 @@ and _Shibboleth_ backend.
{occ-command-example-prefix} user:sync "OCA\User\SMB" -vvv
----

=== Shibboleth

[source,console,subs="attributes+"]
----
{occ-command-example-prefix} user:sync "OCA\User_Shibboleth\UserBackend"
----

Below are examples of how to use the command with the *LDAP* backend along with example console output.

=== Example 1
Expand Down
62 changes: 5 additions & 57 deletions modules/developer_manual/pages/testing/unit-testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,71 +8,19 @@

== PHP Unit Tests

ownCloud uses PHPUnit >= 4.8 for unit testing PHP code.
ownCloud uses PHPUnit >= 7.5 for unit testing PHP code.

=== Getting PHPUnit

==== ownCloud >= 10.0

If you are using ownCloud 10.0 or higher, running `make` in your
terminal from the `webroot` directory will prepare everything for
testing. This will install beside necessary dependencies, a local
version of PHPUnit at `<webroot>/lib/composer/phpunit/phpunit`.
Running `make` in your terminal from the `webroot` directory will prepare
everything for testing. This will install beside necessary dependencies,
a local version of PHPUnit at `<webroot>/lib/composer/phpunit/phpunit`.

* Run `make help` to get a list of parameters
* To update your testing environment run `make clean` and `make` again.
* Take care that the php phpunit file in the path provided has the executable permission set.

==== ownCloud < 10.0

If you are on any version earlier than 10.0 you have to setup PHPUnit
(and run the tests) manually. There are three ways to install it:

[start=1]
. Use Composer
+
----
composer require phpunit/phpunit
----

[start=2]
. Use your package manager (if you’re using a Linux distribution)
+
----
# When using a Debian-based distribution
sudo apt-get install phpunit
----

[start=3]
. Install it manually
+
----
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit
----

After the installation the command `phpunit` is available

----
phpunit --version
----

IMPORTANT: Please be aware that PHPUnit 6.0 and above require PHP 7.0.

And you can update it using:

----
phpunit --self-update
----

This option is not supported from PHPUnit 6.0 onward. If you’re using
this version or higher, please use either Composer or your package
manager to upgrade to the latest version.

You can find more information in {phpunit-docs-url}[the PHPUnit documentation].

=== Running PHP Unit tests for ownCloud >= 10.0
=== Running PHP Unit tests

There are existing test options provided by ownCloud.
To run them, change into the root directory of your ownCloud installation and run `grep "make test" <(make help)` to see tests and parameters available.
Expand Down

0 comments on commit 0add10b

Please sign in to comment.