Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
224
Merge Requests
224
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
ac850c02
Commit
ac850c02
authored
Jun 26, 2014
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2287223
by tim.plunkett: Use KernelTestBase for config schema tests where possible.
parent
76b3f7de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
core/modules/block/src/Tests/BlockConfigSchemaTest.php
core/modules/block/src/Tests/BlockConfigSchemaTest.php
+4
-3
core/modules/config/src/Tests/DefaultConfigTest.php
core/modules/config/src/Tests/DefaultConfigTest.php
+2
-2
core/modules/user/src/Tests/UserActionConfigSchemaTest.php
core/modules/user/src/Tests/UserActionConfigSchemaTest.php
+6
-4
No files found.
core/modules/block/src/Tests/BlockConfigSchemaTest.php
View file @
ac850c02
...
...
@@ -9,19 +9,19 @@
use
Drupal\block\Entity\Block
;
use
Drupal\config\Tests\SchemaCheckTestTrait
;
use
Drupal\simpletest\
Web
TestBase
;
use
Drupal\simpletest\
Kernel
TestBase
;
/**
* Tests the block config schema.
*/
class
BlockConfigSchemaTest
extends
Web
TestBase
{
class
BlockConfigSchemaTest
extends
Kernel
TestBase
{
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'
);
}
/**
...
...
core/modules/config/src/Tests/DefaultConfigTest.php
View file @
ac850c02
...
...
@@ -10,12 +10,12 @@
use
Drupal\config_test
\
TestInstallStorage
;
use
Drupal\Core\Config\InstallStorage
;
use
Drupal\Core\Config\TypedConfigManager
;
use
Drupal\simpletest\
Web
TestBase
;
use
Drupal\simpletest\
Kernel
TestBase
;
/**
* Tests default configuration availability and type with configuration schema.
*/
class
DefaultConfigTest
extends
Web
TestBase
{
class
DefaultConfigTest
extends
Kernel
TestBase
{
use
SchemaCheckTestTrait
;
...
...
core/modules/user/src/Tests/UserActionConfigSchemaTest.php
View file @
ac850c02
...
...
@@ -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
Web
TestBase
{
class
UserActionConfigSchemaTest
extends
Kernel
TestBase
{
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment