You are here

public function Drupal6SqlBaseTest::testGetModuleSchemaVersion in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php \Drupal\Tests\migrate_drupal\Unit\source\d6\Drupal6SqlBaseTest::testGetModuleSchemaVersion()

Tests for Drupal6SqlBase::getModuleSchemaVersion().

File

core/modules/migrate_drupal/tests/src/Unit/source/d6/Drupal6SqlBaseTest.php, line 107
Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\Drupal6SqlBaseTest.

Class

Drupal6SqlBaseTest
Tests the D6 SQL base class.

Namespace

Drupal\Tests\migrate_drupal\Unit\source\d6

Code

public function testGetModuleSchemaVersion() {

  // Non-existent module.
  $this
    ->assertFalse($this->base
    ->getModuleSchemaVersionWrapper('module3'));

  // Disabled module should still return schema version.
  $this
    ->assertEquals(7201, $this->base
    ->getModuleSchemaVersionWrapper('module2'));

  // Enabled module.
  $this
    ->assertEquals(-1, $this->base
    ->getModuleSchemaVersionWrapper('module1'));
}