Download the PHP package christophwurst/nextcloud_testing without Composer
On this page you can find all versions of the php package christophwurst/nextcloud_testing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download christophwurst/nextcloud_testing
More information about christophwurst/nextcloud_testing
Files in christophwurst/nextcloud_testing
Package nextcloud_testing
Short Description Simple and fast unit and integration testing framework for Nextcloud, based on PHPUnit
License MIT
Informations about the package nextcloud_testing
Nextcloud Testing
Simple and fast unit and integration testing framework for Nextcloud 25+, based on PHPUnit
Features
- Minimal setUp/tearDown overhead for unit tests
- Simple trait-based mechanism to reset database after integration tests
- Based on PHPUnit
Unit Tests
Use TestCase
as base class for your test case:
Integration Tests
Include the DatabaseTransaction
trait in your test case and any changes to the database will be rolled back after each test:
Selenium Tests
Include the Selenium
trait in your test case and access the Webdriver instance via $this->webDriver
:
This framework targets Sauce Labs as testing back-end that runs the test
browser instances. Hence, it is necessary to set the SAUCE_USERNAME
and SAUCE_ACCESS_KEY
env
variables. SELENIUM_BROWSER
lets you choose the browser to run your tests against.
Test Users
Include the TestUser
trait in your test case to conveniently generate new test users. The trait
will create a new user with a random UID (including collision detection).
The returned user is of type IUser
. You can read its UID with $user->getUID()
. Note that the
user is not removed after the test.
All versions of nextcloud_testing with dependencies
phpunit/phpunit Version ^8.0|^9.0|^10.0
php-webdriver/webdriver Version ^1.9