1 taxonomy.test protected TaxonomyQueryAlterTestCase::assertQueryTagTestResult($expected_invocations, $method)

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.

File

core/modules/taxonomy/tests/taxonomy.test, line 2180
Tests for taxonomy.module.

Class

TaxonomyQueryAlterTestCase
Tests that appropriate query tags are added.

Code

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