You are here

protected function TaxonomyQueryAlterTestCase::assertQueryTagTestResult in Drupal 7

Verifies invocation of the hooks in the test module.

Parameters

int $expected_invocations: The number of times the hooks are expected to have been invoked.

string $method: A string describing the invoked function which generated the query.

1 call to TaxonomyQueryAlterTestCase::assertQueryTagTestResult()
TaxonomyQueryAlterTestCase::testTaxonomyQueryAlter in modules/taxonomy/taxonomy.test
Tests that appropriate tags are added when querying the database.

File

modules/taxonomy/taxonomy.test, line 2089
Tests for taxonomy.module.

Class

TaxonomyQueryAlterTestCase
Tests that appropriate query tags are added.

Code

protected function assertQueryTagTestResult($expected_invocations, $method) {
  $this
    ->assertIdentical($expected_invocations, variable_get('taxonomy_test_query_alter'), 'hook_query_alter() invoked when executing ' . $method);
  $this
    ->assertIdentical($expected_invocations, variable_get('taxonomy_test_query_term_access_alter'), 'Deprecated hook_query_term_access_alter() invoked when executing ' . $method);
  $this
    ->assertIdentical($expected_invocations, variable_get('taxonomy_test_query_taxonomy_term_access_alter'), 'Preferred hook_query_taxonomy_term_access_alter() invoked when executing ' . $method);
}