Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
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(); |
||
63 | |||
64 | $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
||
65 | ->from('yourpasswordhere') |
||
66 | ->to('') |
||
67 | ->run(); |
||
68 | } |
||
69 | |||
70 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.