| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 4 | public function testTruncatesByMaxLength() |
||
| 5 | { |
||
| 6 | Config::nest(); |
||
| 7 | |||
| 8 | Config::inst()->update('FileTextCache_Database', 'max_content_length', 5); |
||
| 9 | $cache = new FileTextCache_Database(); |
||
| 10 | $file = $this->getMock('File', array('write')); |
||
| 11 | $content = '0123456789'; |
||
| 12 | $cache->save($file, $content); |
||
| 13 | $this->assertEquals($cache->load($file), '01234'); |
||
| 14 | |||
| 15 | Config::unnest(); |
||
| 16 | } |
||
| 17 | } |
||
| 18 |
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.