@@ 19-28 (lines=10) @@ | ||
16 | $this->assertEquals($overlap, $needles, "Assert that array contains all values specified"); |
|
17 | } |
|
18 | ||
19 | public function testCheckWords() { |
|
20 | $provider = new HunSpellProvider(); |
|
21 | $result = $provider->checkWords('en_US', array('collor', 'one', 'twoo', 'three')); |
|
22 | $this->assertArrayContains( |
|
23 | array('collor', 'twoo'), |
|
24 | $result |
|
25 | ); |
|
26 | $result = $provider->checkWords('en_US', array('basketball')); |
|
27 | $this->assertEmpty($result); |
|
28 | } |
|
29 | ||
30 | public function testGetSuggestions() { |
|
31 | $provider = new HunSpellProvider(); |
|
@@ 30-39 (lines=10) @@ | ||
27 | $this->assertEmpty($result); |
|
28 | } |
|
29 | ||
30 | public function testGetSuggestions() { |
|
31 | $provider = new HunSpellProvider(); |
|
32 | $result = $provider->getSuggestions('en_US', 'collor'); |
|
33 | $this->assertArrayContains( |
|
34 | array('color', 'collar', 'coll or', 'coll-or', 'collator'), |
|
35 | $result |
|
36 | ); |
|
37 | $result = $provider->getSuggestions('en_US', 'basketball'); |
|
38 | $this->assertEmpty($result); |
|
39 | } |
|
40 | } |
|
41 |