/**
  * Test get_page_contents with groups. We won't test all the possible cases because that's already
  * done in the tests for get_subwiki_pages.
  */
 public function test_get_page_contents_with_groups()
 {
     // Create testing data.
     $this->create_individual_wikis_with_groups();
     // Try to get page from a valid group in separate groups wiki.
     $this->setUser($this->student);
     $expectedfpsepg1indstu = array('id' => $this->fpsepg1indstu->id, 'wikiid' => $this->wikisepind->id, 'subwikiid' => $this->fpsepg1indstu->subwikiid, 'groupid' => $this->group1->id, 'userid' => $this->student->id, 'title' => $this->fpsepg1indstu->title, 'cachedcontent' => $this->fpsepg1indstu->cachedcontent, 'contentformat' => 1, 'caneditpage' => true);
     $result = mod_wiki_external::get_page_contents($this->fpsepg1indstu->id);
     $result = external_api::clean_returnvalue(mod_wiki_external::get_page_contents_returns(), $result);
     $this->assertEquals($expectedfpsepg1indstu, $result['page']);
     // Check that teacher can view a group pages without belonging to it.
     $this->setUser($this->teacher);
     $result = mod_wiki_external::get_page_contents($this->fpsepg1indstu->id);
     $result = external_api::clean_returnvalue(mod_wiki_external::get_page_contents_returns(), $result);
     $this->assertEquals($expectedfpsepg1indstu, $result['page']);
 }