Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 2 |
1 | <?php |
||
7 | public function testLanguagesSyntax() { |
||
8 | |||
9 | if (!function_exists('add_translation')) { |
||
10 | //whatever, we just test syntax correctness |
||
11 | |||
12 | function add_translation($country_code, $language_array) { |
||
13 | return true; |
||
14 | } |
||
15 | } |
||
16 | |||
17 | $path = dirname(dirname(dirname(__FILE__))) . '/languages/en.php'; |
||
18 | $this->assertTrue(file_exists($path)); |
||
19 | $languages = include($path); |
||
20 | $this->assertTrue($languages === 1 || is_array($languages)); |
||
21 | } |
||
22 | } |
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.