| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | { |
||
| 41 | $this->taskPhpUnit('vendor/bin/phpunit') |
||
| 42 | ->configFile('tests/phpunit.xml.dist') |
||
| 43 | ->envVars(array('WP_TESTS_DIR' => 'wp-tests')) |
||
| 44 | ->run(); |
||
| 45 | } |
||
| 46 | |||
| 47 | private function setTestConfig() |
||
| 48 | { |
||
| 49 | |||
| 50 | if (file_exists('wp-tests/wp-tests-config-sample.php')) { |
||
| 51 | copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php'); |
||
| 52 | } |
||
| 53 | |||
| 54 | $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
||
| 55 | ->from('youremptytestdbnamehere') |
||
| 56 | ->to('test_db') |
||
| 57 | ->run(); |
||
| 58 | |||
| 59 | $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
||
| 60 | ->from('yourusernamehere') |
||
| 61 | ->to('root') |
||
| 62 | ->run(); |
||
| 70 | } |