Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
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 | |||
54 | } |
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.