for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
// define public methods as commands
function scripts() {
$this->taskMinify('assets/maps.js')
->to('dist/scripts/maps.min.js')
->run();
}
function tests()
$this->taskExec('mysql -e "CREATE DATABASE IF NOT EXISTS test_db"')->run();
$this->taskExec('mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"')->run();
$this->taskSvnStack()
->checkout('https://develop.svn.wordpress.org/tags/4.8.3 wp-tests')
$this->setTestConfig();
$this->phpunit();
function phpunit()
$this->taskPhpUnit('vendor/bin/phpunit')
->configFile('tests/phpunit.xml.dist')
->envVars(array('WP_TESTS_DIR' => 'wp-tests'))
private function setTestConfig()
if (file_exists('wp-tests/wp-tests-config-sample.php')) {
copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php');
$this->taskReplaceInFile( 'wp-tests/wp-tests-config.php')
->from('youremptytestdbnamehere')
->to('test_db')
->from('yourusernamehere')
->to('root')
->from('yourpasswordhere')
->to('')