Download the PHP package damianlewis/octobertesting-plugin without Composer
On this page you can find all versions of the php package damianlewis/octobertesting-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download damianlewis/octobertesting-plugin
More information about damianlewis/octobertesting-plugin
Files in damianlewis/octobertesting-plugin
Package octobertesting-plugin
Short Description Enables Laravel's testing frameworks for October CMS
License MIT
Informations about the package octobertesting-plugin
October Testing
Enables the use of the Laravel testing frameworks within October CMS.
Usage
Installation
Install via Composer:
Plugin Feature & Unit Tests
To test plugins, create a tests
folder within the plugin base folder and copy the phpunit.xml
file to this location, for example, /plugins/acme/blog/tests/phpunit.xml
. Create sub folders for feature and unit tests, for example, /plugins/acme/blog/tests/feature/
and /plugins/acme/blog/tests/unit/
. Then in the tests folders, create tests following the principles used for Laravel testing. Test suites have been configured within the phpunit.xml
file for feature and unit tests.
When creating tests, use the alternative Tests\PluginTestCase
class. This alternative class doesn't make use of an in memory database, allowing you to choose what database you wish to use for testing. See example below.
Laravel Dusk
To make use of Laravel Dusk with OctoberCMS, run the dusk:install
Artisan command:
Then use Dusk as you would with Laravel, see Laravel Dusk. For example, to run tests from the CLI use the dusk
Artisan command:
Authentication
To make use of the login
and loginAs
authentication methods, an object containing the login
and password
for the user is expected. To provide the default/admin user account, you can override the user
method in the Tests\DuskTestCase
class as follows:
Screenshots
To create browser screenshots add the --window-size
argument to the ChromeOptions->addArguments
method as shown below:
All versions of octobertesting-plugin with dependencies
composer/installers Version ~1.0
october/system Version >=1.0.420
laravel/dusk Version ~2.0