You are here

public function TermTranslationUITest::testTranslationUI in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/taxonomy/src/Tests/TermTranslationUITest.php \Drupal\taxonomy\Tests\TermTranslationUITest::testTranslationUI()

Tests the basic translation UI.

Overrides ContentTranslationUITestBase::testTranslationUI

File

core/modules/taxonomy/src/Tests/TermTranslationUITest.php, line 93
Contains \Drupal\taxonomy\Tests\TermTranslationUITest.

Class

TermTranslationUITest
Tests the Term Translation UI.

Namespace

Drupal\taxonomy\Tests

Code

public function testTranslationUI() {
  parent::testTranslationUI();

  // Make sure that no row was inserted for taxonomy vocabularies which do
  // not have translations enabled.
  $rows = db_query('SELECT tid, count(tid) AS count FROM {taxonomy_term_field_data} WHERE vid <> :vid GROUP BY tid', array(
    ':vid' => $this->bundle,
  ))
    ->fetchAll();
  foreach ($rows as $row) {
    $this
      ->assertTrue($row->count < 2, 'Term does not have translations.');
  }
}