diff -r bb7808e180c3 -r 021131fbe2c5 Tests/Services/SearchServiceTest.php --- a/Tests/Services/SearchServiceTest.php Thu Feb 23 18:52:59 2012 +0100 +++ b/Tests/Services/SearchServiceTest.php Fri Feb 24 10:55:01 2012 +0100 @@ -97,12 +97,20 @@ $search_service = $this->get("wiki_tag.search"); $result = $search_service->completion("tag"); + $completion_result = array( + 'Tag1' => 2, + 'Tag2' => 4, + 'Tag3' => 5, + 'Tag4' => 6 + ); $this->assertNotNull($result, "completion should not be null"); $this->assertEquals(4, count($result)); foreach ($result as $tagname) { - $this->assertEquals(0,strpos($tagname,"tag")); + $this->assertEquals(0,strpos($tagname['label'],"Tag")); + $this->assertArrayHasKey($tagname['label'], $completion_result); + $this->assertEquals($completion_result[$tagname['label']], $tagname['nb_docs']); } }