function TaxonomyQueryAlterTestCase::assertQueryTagTestResult

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 2213

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.