Commit ac850c02 authored by catch's avatar catch

Issue #2287223 by tim.plunkett: Use KernelTestBase for config schema tests where possible.

parent 76b3f7de
......@@ -9,19 +9,19 @@
use Drupal\block\Entity\Block;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\simpletest\WebTestBase;
use Drupal\simpletest\KernelTestBase;
/**
* Tests the block config schema.
*/
class BlockConfigSchemaTest extends WebTestBase {
class BlockConfigSchemaTest extends KernelTestBase {
use SchemaCheckTestTrait;
/**
* {@inheritdoc}
*/
public static $modules = array('block', 'aggregator', 'book', 'block_content', 'forum', 'statistics');
public static $modules = array('block', 'aggregator', 'book', 'block_content', 'forum', 'node', 'statistics', 'taxonomy');
/**
* The typed config manager.
......@@ -56,6 +56,7 @@ protected function setUp() {
$this->typedConfig = \Drupal::service('config.typed');
$this->blockManager = \Drupal::service('plugin.manager.block');
$this->installEntitySchema('block_content');
}
/**
......
......@@ -10,12 +10,12 @@
use Drupal\config_test\TestInstallStorage;
use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Config\TypedConfigManager;
use Drupal\simpletest\WebTestBase;
use Drupal\simpletest\KernelTestBase;
/**
* Tests default configuration availability and type with configuration schema.
*/
class DefaultConfigTest extends WebTestBase {
class DefaultConfigTest extends KernelTestBase {
use SchemaCheckTestTrait;
......
......@@ -8,12 +8,13 @@
namespace Drupal\user\Tests;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\simpletest\WebTestBase;
use Drupal\simpletest\KernelTestBase;
use Drupal\user\Entity\Role;
/**
* Tests the User action config schema.
*/
class UserActionConfigSchemaTest extends WebTestBase {
class UserActionConfigSchemaTest extends KernelTestBase {
use SchemaCheckTestTrait;
......@@ -22,7 +23,7 @@ class UserActionConfigSchemaTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('user');
public static $modules = array('system', 'user');
/**
* A user with administrative permissions.
......@@ -43,7 +44,8 @@ public static function getInfo() {
* Tests whether the user action config schema are valid.
*/
function testValidUserActionConfigSchema() {
$rid = $this->drupalCreateRole(array());
$rid = strtolower($this->randomName(8));
Role::create(array('id' => $rid))->save();
// Test user_add_role_action configuration.
$config = \Drupal::config('system.action.user_add_role_action.' . $rid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment