Skip to content
Permalink
Browse files

Change search test

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jun 21, 2018
1 parent 9950681 commit 414c1979c1eeca8830fd1632f3d153a3de56bf9b
Showing with 13 additions and 22 deletions.
  1. +13 −22 test/classes/Database/SearchTest.php
@@ -181,44 +181,35 @@ public function testGetSearchResults()
*
* @return void
*/
public function testGetSelectionForm()
public function testGetMainHtml()
{
$form = $this->object->getSelectionForm();
$this->assertContains('<form', $form);
$this->assertContains('<a id="togglesearchformlink">', $form);
$this->assertContains('criteriaSearchType', $form);
}
$main = $this->object->getMainHtml();
/**
* Test for getResultDivs
*
* @return void
*/
public function testGetResultDivs()
{
$actual = $this->callProtectedFunction(
'getResultDivs',
[]
);
// test selection form
$this->assertContains('<form', $main);
$this->assertContains('<a id="togglesearchformlink">', $main);
$this->assertContains('criteriaSearchType', $main);
// test result divs
$this->assertContains(
'<div id="table-info"',
$actual
$main
);
$this->assertContains(
'<a id="table-link"',
$actual
$main
);
$this->assertContains(
'<div id="browse-results"',
$actual
$main
);
$this->assertContains(
'<div id="sqlqueryform"',
$actual
$main
);
$this->assertContains(
'<a id="togglequerybox"',
$actual
$main
);
}
}

0 comments on commit 414c197

Please sign in to comment.
You can’t perform that action at this time.