Lines Matching defs:expected
70 * Test if the getTopic and the tagRefine function with all pages as input both return the expected pages
72 * @param array $expected expected page ids
75 private function assertTopicRefine($expected, $query) {
79 $this->hasPages($expected, $pages, 'Refine: '.$query.': ');
81 $this->hasPages($expected, $pages, 'Topic: '.$query.': ');
87 * @param array $expected List of page ids
91 private function hasPages($expected, $actual, $msg_prefix = '') {
92 foreach ($expected as $id) {
100 $this->assertTrue($found, $msg_prefix.'Page '.$id.' expected but not found in the result');
104 $this->assertTrue(in_array($page['id'], $expected), $msg_prefix.'Page '.$page['id'].' is in the result but wasn\'t expected');