-
Notifications
You must be signed in to change notification settings - Fork 0
Development
Important: This documentation is still under construction, methods and/or properties may be missing or not fully documented
This is a more technical documentation, in this document is assumed that you already changed your terminal to your plugin root directory.
To install all dependencies you must run:
composer install
Run the installation script:
bin/install-wp-tests.sh dbname dbuser dbpass dbhost latest
Where
-
dbname
– This is the name of the database that will be created. -
dbuser
- Our MySQL username. -
dbpass
- Our MySQL password. -
dbhost
- The MySQL server host. -
lastest
- The version of WordPress to install.
PHPUnit 7.x is installed as development dependency to avoid conflict with another version installed in your system. To run the tests associated with our plugin run the following command:
php vendor/phpunit/phpunit/phpunit
To generate a .POT file to add translations to this plugin run this:
wp i18n make-pot .
Previous to generate you need install wp dist-archive
package command, to do this run:
wp package install wp-cli/dist-archive-command
To create a distribution zip archive in wp-content/plugins/
based on the plugin's .distignore
file run this:
composer install --no-dev --optimize-autoloader
wp dist-archive .