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