You are here

function GoogleMiniTest::testNoResults in Google Search Appliance 6.2

Same name and namespace in other branches
  1. 5 tests/googlemini.test \GoogleMiniTest::testNoResults()

File

tests/googlemini.test, line 33

Class

GoogleMiniTest

Code

function testNoResults() {
  $g = clone $this->stockMini;
  try {
    $query = "sjahdkjsadhsakjdhsakjdlakdjsahdlkjsasdhsad";
    $g
      ->setKeywords($query);
    $result = $g
      ->query();
  } catch (GoogleMiniCriteriaException $e) {
  } catch (GoogleMiniResultException $e) {
    if ($e
      ->getCode() == 1) {
      $this
        ->assertEqual(true, true, "The Query {$query} fired a no results exception.  (good)");
    }
  }

  /* Test code goes here. Notice you have to have your test method names begin with lowercase 'test'. */
}