| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 2 | Features | 0 |
| 1 | <?php |
||
| 9 | class SynonymsTest extends SapphireTest |
||
| 10 | { |
||
| 11 | public function testGetSynonyms() |
||
| 12 | { |
||
| 13 | $synonyms = Synonyms::config()->get('usuk'); |
||
| 14 | |||
| 15 | $this->assertEquals($synonyms['synonyms'], Synonyms::getSynonyms()); |
||
| 16 | $this->assertEmpty(Synonyms::getSynonyms(false)); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function testGetSynonymsAsString() |
||
| 20 | { |
||
| 21 | $synonyms = Synonyms::config()->get('usuk'); |
||
| 22 | $synonyms = $synonyms['synonyms']; |
||
| 23 | $rendered = Synonyms::getSynonymsAsString(); |
||
| 24 | |||
| 25 | $this->assertStringEndsWith("\n", $rendered); |
||
| 26 | |||
| 27 | // Add 1 to the count, because the rendered string ends with a newline, thus adding one item to the array |
||
| 28 | $this->assertCount(count($synonyms) + 1, explode("\n", $rendered)); |
||
| 29 | } |
||
| 31 |