@@ -118,7 +118,7 @@ |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | - * @param $url |
|
| 121 | + * @param string $url |
|
| 122 | 122 | * @return array|\WP_Error |
| 123 | 123 | */ |
| 124 | 124 | private function _get_data( $url ) { |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @param $class |
|
| 37 | - * @param $method |
|
| 36 | + * @param \Clubdeuce\WPLib\Components\GoogleMaps\Marker_Model $class |
|
| 37 | + * @param string $method |
|
| 38 | 38 | * @return mixed |
| 39 | 39 | */ |
| 40 | 40 | public function reflectionMethodInvoke( $class, $method ) |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * @param $class |
| 52 | - * @param $method |
|
| 52 | + * @param string $method |
|
| 53 | 53 | * @param $args |
| 54 | 54 | * @return mixed |
| 55 | 55 | */ |
@@ -7,48 +7,48 @@ |
||
| 7 | 7 | class RoboFile extends \Robo\Tasks |
| 8 | 8 | { |
| 9 | 9 | // define public methods as commands |
| 10 | - function tests() |
|
| 11 | - { |
|
| 12 | - |
|
| 13 | - $this->taskExec('mysql -e "CREATE DATABASE IF NOT EXISTS test_db"')->run(); |
|
| 14 | - $this->taskExec('mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"')->run(); |
|
| 15 | - $this->taskSvnStack() |
|
| 16 | - ->checkout('https://develop.svn.wordpress.org/tags/4.8.3 wp-tests') |
|
| 17 | - ->run(); |
|
| 18 | - |
|
| 19 | - $this->setTestConfig(); |
|
| 20 | - $this->phpunit(); |
|
| 21 | - |
|
| 22 | - } |
|
| 23 | - |
|
| 24 | - function phpunit() |
|
| 25 | - { |
|
| 26 | - $this->taskPhpUnit('vendor/bin/phpunit') |
|
| 27 | - ->configFile('tests/phpunit.xml.dist') |
|
| 28 | - ->run(); |
|
| 29 | - } |
|
| 30 | - |
|
| 31 | - private function setTestConfig() |
|
| 32 | - { |
|
| 33 | - |
|
| 34 | - if (file_exists('wp-tests/wp-tests-config-sample.php')) { |
|
| 35 | - copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php'); |
|
| 36 | - } |
|
| 37 | - |
|
| 38 | - $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
|
| 39 | - ->from('youremptytestdbnamehere') |
|
| 40 | - ->to('test_db') |
|
| 41 | - ->run(); |
|
| 42 | - |
|
| 43 | - $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
|
| 44 | - ->from('yourusernamehere') |
|
| 45 | - ->to('root') |
|
| 46 | - ->run(); |
|
| 47 | - |
|
| 48 | - $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
|
| 49 | - ->from('yourpasswordhere') |
|
| 50 | - ->to('') |
|
| 51 | - ->run(); |
|
| 52 | - } |
|
| 10 | + function tests() |
|
| 11 | + { |
|
| 12 | + |
|
| 13 | + $this->taskExec('mysql -e "CREATE DATABASE IF NOT EXISTS test_db"')->run(); |
|
| 14 | + $this->taskExec('mysql -e "GRANT ALL ON test_db.* to \'root\'@\'%\'"')->run(); |
|
| 15 | + $this->taskSvnStack() |
|
| 16 | + ->checkout('https://develop.svn.wordpress.org/tags/4.8.3 wp-tests') |
|
| 17 | + ->run(); |
|
| 18 | + |
|
| 19 | + $this->setTestConfig(); |
|
| 20 | + $this->phpunit(); |
|
| 21 | + |
|
| 22 | + } |
|
| 23 | + |
|
| 24 | + function phpunit() |
|
| 25 | + { |
|
| 26 | + $this->taskPhpUnit('vendor/bin/phpunit') |
|
| 27 | + ->configFile('tests/phpunit.xml.dist') |
|
| 28 | + ->run(); |
|
| 29 | + } |
|
| 30 | + |
|
| 31 | + private function setTestConfig() |
|
| 32 | + { |
|
| 33 | + |
|
| 34 | + if (file_exists('wp-tests/wp-tests-config-sample.php')) { |
|
| 35 | + copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php'); |
|
| 36 | + } |
|
| 37 | + |
|
| 38 | + $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
|
| 39 | + ->from('youremptytestdbnamehere') |
|
| 40 | + ->to('test_db') |
|
| 41 | + ->run(); |
|
| 42 | + |
|
| 43 | + $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
|
| 44 | + ->from('yourusernamehere') |
|
| 45 | + ->to('root') |
|
| 46 | + ->run(); |
|
| 47 | + |
|
| 48 | + $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
|
| 49 | + ->from('yourpasswordhere') |
|
| 50 | + ->to('') |
|
| 51 | + ->run(); |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | 54 | } |
| 55 | 55 | \ No newline at end of file |