| 1 taxonomy.test | public TaxonomyTermTestCase::testTaxonomySelectNodesAlter() | 
Tests that taxonomy term detail page is working even after the default taxonomy_select_nodes() query is altered.
File
- core/modules/ taxonomy/ tests/ taxonomy.test, line 987 
- Tests for taxonomy.module.
Class
- TaxonomyTermTestCase
- Tests for taxonomy term functions.
Code
public function testTaxonomySelectNodesAlter() {
  // Create a new term.
  $term = $this->createTerm($this->vocabulary);
  // Create an article.
  $settings = array(
    'type' => 'article',
    $this->instance['field_name'] => array(LANGUAGE_NONE => array(array('tid' => $term->tid))),
  );
  $this->backdropCreateNode($settings);
  // Check if the taxonomy term detail page is working.
  module_enable(array('taxonomy_nodes_test'));
  state_set('taxonomy_nodes_test_query_node_access_alter', TRUE);
  $this->backdropGet('taxonomy/term/' . $term->tid);
  $this->assertResponse(200, 'The taxonomy term page is working.');
  state_set('taxonomy_nodes_test_query_node_access_alter', FALSE);
}
