assertTrue(strpos($response2->getBody(), 'id="Root_Configuration"') !== false); $this->assertTrue(strpos($response2->getBody(), ' 1)); $this->assertTrue(strpos($response3->getBody(), 'id="Root_Configuration"') !== false); $this->assertTrue(strpos($response3->getBody(), 'assertTrue(strpos($response3->getBody(), 'getIntranetTemplates(); $templateIDs = $this->allFixtureIDs('Subsite_Template'); $this->assertTrue($templates->onlyContainsIDs($templateIDs)); } /** * Test searching for an intranet */ function testIntranetSearch() { $cont = new SubsiteAdmin(); $cont->pushCurrent(); $member = $this->objFromFixture('Member','admin'); $member->logIn(); // Check that the logged-in member has the correct permissions $this->assertTrue(Permission::check('ADMIN') ? true : false); $form = $cont->SearchForm(); $searches = array( array('Name' => 'Other'), ); foreach($searches as $search) { $response = $form->testAjaxSubmission('getResults', $search); $links = $response->getLinks(); foreach($links as $link) { $this->assertTrue(preg_match('/^admin\/subsites\/show\/[0-9]+$/', $link['href']) == 1, "Search result links bad."); } } $cont->popCurrent(); } } ?>