function DrupalUnitTestBaseTest::testSetUp

Tests expected behavior of setUp().

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/Tests/DrupalUnitTestBaseTest.php, line 35
Contains Drupal\simpletest\Tests\DrupalUnitTestBaseTest.

Class

DrupalUnitTestBaseTest
Tests DrupalUnitTestBase functionality.

Namespace

Drupal\simpletest\Tests

Code

function testSetUp() {
  $module = 'entity_test';
  $table = 'entity_test';

  // Verify that specified $modules have been loaded.
  $this
    ->assertTrue(function_exists('entity_test_permission'), "{$module}.module was loaded.");

  // Verify that there is a fixed module list.
  $this
    ->assertIdentical(module_list(), array(
    $module => $module,
  ));
  $this
    ->assertIdentical(module_implements('permission'), array(
    $module,
  ));

  // Verify that no modules have been installed.
  $this
    ->assertFalse(db_table_exists($table), "'{$table}' database table not found.");
}