You are here

protected function EntityAutocompleteWebTestCase::countResult in Entity Autocomplete 7

Count the number of results from Drupal current page.

1 call to EntityAutocompleteWebTestCase::countResult()
EntityAutocompleteWebTestCase::testEntityAutocompleteCallback in tests/entity_autocomplete.test
Tests autocomplete callback.

File

tests/entity_autocomplete.test, line 93
Tests suite for Entity Autocomplete module.

Class

EntityAutocompleteWebTestCase
Performs functional tests on advanced functionalities, such as administrative UI, etc.

Code

protected function countResult() {
  $result = drupal_json_decode($this
    ->drupalGetContent());
  return isset($result) && is_array($result) ? count($result) : -1;
}