You are here

function SearchByPageUnitTest::testUniqueRewrite in Search by Page 6

Tests the search_by_page_unique_rewrite() function.

File

tests/search_by_page.test, line 53
Tests for the Search by Page module. By Jennifer Hodgdon of Poplar ProductivityWare, www.poplarware.com

Class

SearchByPageUnitTest
Unit tests for Search by Page functions.

Code

function testUniqueRewrite() {
  $result = search_by_page_unique_rewrite('abc_');
  $this
    ->assertTrue(count($result) >= 2, "search_by_page_unique_rewrite() has 2 or more components");
  $this
    ->assertTrue(strrpos($result[0], 'abc_n') > 0, "search_by_page_unique_rewrite() join contains abc_n");
  $this
    ->assertTrue(strrpos($result[1], 'abc_n') > 0, "search_by_page_unique_rewrite() where contains abc_n");
}