Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | private function setTestConfig() |
||
41 | { |
||
42 | |||
43 | if (file_exists('wp-tests/wp-tests-config-sample.php')) { |
||
44 | copy('wp-tests/wp-tests-config-sample.php', 'wp-tests/wp-tests-config.php'); |
||
45 | } |
||
46 | |||
47 | $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
||
48 | ->from('youremptytestdbnamehere') |
||
49 | ->to('test_db') |
||
50 | ->run(); |
||
51 | |||
52 | $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
||
53 | ->from('yourusernamehere') |
||
54 | ->to('root') |
||
55 | ->run(); |
||
56 | |||
57 | $this->taskReplaceInFile( 'wp-tests/wp-tests-config.php') |
||
58 | ->from('yourpasswordhere') |
||
59 | ->to('') |
||
60 | ->run(); |
||
61 | } |
||
62 | |||
63 | } |
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.