diff -u b/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test --- b/core/modules/taxonomy/taxonomy.test +++ b/core/modules/taxonomy/taxonomy.test @@ -37,7 +37,7 @@ 'help' => '', 'nodes' => array('article' => 'article'), 'weight' => mt_rand(0, 10), - )); + )); taxonomy_vocabulary_save($vocabulary); return $vocabulary; } @@ -53,7 +53,7 @@ 'format' => db_query_range('SELECT format FROM {filter_format}', 0, 1)->fetchField(), 'vid' => $vocabulary->vid, 'langcode' => LANGUAGE_NOT_SPECIFIED, - )); + )); taxonomy_term_save($term); return $term; } @@ -985,7 +985,7 @@ $new_term = entity_create('taxonomy_term', array( 'name' => $term->name, 'vid' => $new_vocabulary->vid, - )); + )); taxonomy_term_save($new_term); // Load multiple terms with the same name. @@ -1212,7 +1212,7 @@ $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_1->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 1 is indexed once.'); // Update the article to change one term. @@ -1223,12 +1223,12 @@ $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_1->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 1 is indexed.'); $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_2->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 2 is indexed.'); // Update the article to change another term. @@ -1244,7 +1244,7 @@ $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_2->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 2 is indexed once.'); // Redo the above tests without interface. @@ -1264,12 +1264,12 @@ $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_1->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(0, $index_count, 'Term 1 is not indexed.'); $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_2->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 2 is indexed once.'); // Update the article to change one term. @@ -1281,12 +1281,12 @@ $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_1->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 1 is indexed.'); $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_2->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 2 is indexed.'); // Update the article to change another term. @@ -1298,12 +1298,12 @@ $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_1->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(1, $index_count, 'Term 1 is indexed once.'); $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array( ':nid' => $node->nid, ':tid' => $term_2->tid, - ))->fetchField(); + ))->fetchField(); $this->assertEqual(0, $index_count, 'Term 2 is not indexed.'); } @@ -1511,7 +1511,8 @@ try { field_attach_validate('test_entity', $entity); $this->pass('Correct term does not cause validation error'); - } catch (FieldValidationException $e) { + } + catch (FieldValidationException $e) { $this->fail('Correct term does not cause validation error'); } @@ -1521,7 +1522,8 @@ try { field_attach_validate('test_entity', $entity); $this->fail('Wrong term causes validation error'); - } catch (FieldValidationException $e) { + } + catch (FieldValidationException $e) { $this->pass('Wrong term causes validation error'); } }