Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
f9c1ff23
Commit
f9c1ff23
authored
Aug 12, 2014
by
alexpott
Browse files
Issue
#2314123
by sun: Fixed various tests.
parent
1d1ff757
Changes
55
Hide whitespace changes
Inline
Side-by-side
core/modules/block/src/Tests/BlockConfigSchemaTest.php
View file @
f9c1ff23
...
...
@@ -32,6 +32,8 @@ class BlockConfigSchemaTest extends KernelTestBase {
'forum'
,
'node'
,
'statistics'
,
// BlockManager->getModuleName() calls system_get_info().
'system'
,
'taxonomy'
,
);
...
...
core/modules/ckeditor/src/Tests/CKEditorPluginManagerTest.php
View file @
f9c1ff23
...
...
@@ -22,7 +22,7 @@ class CKEditorPluginManagerTest extends DrupalUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'system'
,
'editor'
,
'ckeditor'
);
public
static
$modules
=
array
(
'system'
,
'user'
,
'filter'
,
'editor'
,
'ckeditor'
);
/**
* The manager for "CKEditor plugin" plugins.
...
...
@@ -36,7 +36,6 @@ function setUp() {
// Install the Filter module.
$this
->
installSchema
(
'system'
,
'url_alias'
);
$this
->
enableModules
(
array
(
'user'
,
'filter'
));
// Create text format, associate CKEditor.
$filtered_html_format
=
entity_create
(
'filter_format'
,
array
(
...
...
core/modules/ckeditor/src/Tests/CKEditorTest.php
View file @
f9c1ff23
...
...
@@ -23,7 +23,7 @@ class CKEditorTest extends DrupalUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'system'
,
'editor'
,
'ckeditor'
,
'filter_test'
);
public
static
$modules
=
array
(
'system'
,
'user'
,
'filter'
,
'editor'
,
'ckeditor'
,
'filter_test'
);
/**
* An instance of the "CKEditor" text editor plugin.
...
...
@@ -44,7 +44,6 @@ function setUp() {
// Install the Filter module.
$this
->
installSchema
(
'system'
,
'url_alias'
);
$this
->
enableModules
(
array
(
'user'
,
'filter'
));
// Create text format, associate CKEditor.
$filtered_html_format
=
entity_create
(
'filter_format'
,
array
(
...
...
core/modules/comment/src/Tests/CommentDefaultFormatterCacheTagsTest.php
View file @
f9c1ff23
...
...
@@ -24,7 +24,7 @@ class CommentDefaultFormatterCacheTagsTest extends EntityUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'entity_test'
,
'comment'
,
'menu_link'
);
public
static
$modules
=
array
(
'entity_test'
,
'comment'
);
/**
* {@inheritdoc}
...
...
core/modules/comment/src/Tests/CommentStringIdEntitiesTest.php
View file @
f9c1ff23
...
...
@@ -29,6 +29,8 @@ class CommentStringIdEntitiesTest extends KernelTestBase {
'field_ui'
,
'entity'
,
'entity_test'
,
// EMAIL_MAX_LENGTH constant.
'system'
,
'text'
,
);
...
...
core/modules/config/src/Tests/ConfigEntityUnitTest.php
View file @
f9c1ff23
...
...
@@ -71,6 +71,9 @@ public function testStorageMethods() {
// Ensure that the configuration entity can be loaded by UUID.
$entity_loaded_by_uuid
=
entity_load_by_uuid
(
$entity_type
->
id
(),
$entity
->
uuid
());
if
(
!
$entity_loaded_by_uuid
)
{
$this
->
fail
(
sprintf
(
"Failed to load '%s' entity ID '%s' by UUID '%s'."
,
$entity_type
->
id
(),
$entity
->
id
(),
$entity
->
uuid
()));
}
// Compare UUIDs as the objects are not identical since
// $entity->enforceIsNew is FALSE and $entity_loaded_by_uuid->enforceIsNew
// is NULL.
...
...
core/modules/config/src/Tests/Storage/CachedStorageTest.php
View file @
f9c1ff23
...
...
@@ -11,6 +11,7 @@
use
Drupal\Core\Config\CachedStorage
;
use
Drupal\Core\Database\Database
;
use
Drupal\Core\DependencyInjection\ContainerBuilder
;
use
Symfony\Component\DependencyInjection\Reference
;
/**
* Tests CachedStorage operations.
...
...
@@ -89,7 +90,7 @@ public function containerBuild(ContainerBuilder $container) {
parent
::
containerBuild
(
$container
);
// Use the regular database cache backend to aid testing.
$container
->
register
(
'cache_factory'
,
'Drupal\Core\Cache\DatabaseBackendFactory'
)
->
addArgument
(
Database
::
getConnection
(
));
->
addArgument
(
new
Reference
(
'database'
));
}
}
core/modules/config/src/Tests/Storage/ConfigStorageTestBase.php
View file @
f9c1ff23
...
...
@@ -28,6 +28,11 @@ abstract class ConfigStorageTestBase extends DrupalUnitTestBase {
*/
protected
$storage
;
/**
* @var \Drupal\Core\Config\StorageInterface;
*/
protected
$invalidStorage
;
/**
* Tests storage CRUD operations.
*
...
...
core/modules/config/src/Tests/Storage/FileStorageTest.php
View file @
f9c1ff23
...
...
@@ -46,7 +46,7 @@ protected function delete($name) {
/**
* Tests the FileStorage::listAll method with a relative and absolute path.
*/
p
rotected
function
testlistAll
()
{
p
ublic
function
testlistAll
()
{
$expected_files
=
array
(
'core.extension'
,
'system.performance'
,
...
...
core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php
View file @
f9c1ff23
...
...
@@ -32,7 +32,7 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'dblog_test_views'
);
public
static
$modules
=
array
(
'dblog'
,
'dblog_test_views'
);
/**
* {@inheritdoc}
...
...
@@ -40,7 +40,6 @@ class ViewsIntegrationTest extends ViewUnitTestBase {
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
enableModules
(
array
(
'system'
,
'dblog'
));
$this
->
installSchema
(
'dblog'
,
array
(
'watchdog'
));
ViewTestData
::
createTestViews
(
get_class
(
$this
),
array
(
'dblog_test_views'
));
...
...
core/modules/editor/src/Tests/EditorManagerTest.php
View file @
f9c1ff23
...
...
@@ -22,7 +22,7 @@ class EditorManagerTest extends DrupalUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'system'
,
'editor'
);
public
static
$modules
=
array
(
'system'
,
'user'
,
'filter'
,
'editor'
);
/**
* The manager for text editor plugins.
...
...
@@ -36,7 +36,6 @@ public function setUp() {
// Install the Filter module.
$this
->
installSchema
(
'system'
,
'url_alias'
);
$this
->
enableModules
(
array
(
'user'
,
'filter'
));
// Add text formats.
$filtered_html_format
=
entity_create
(
'filter_format'
,
array
(
...
...
core/modules/editor/src/Tests/QuickEditIntegrationTest.php
View file @
f9c1ff23
...
...
@@ -24,6 +24,11 @@
*/
class
QuickEditIntegrationTest
extends
QuickEditTestBase
{
/**
* {@inheritdoc}
*/
public
static
$modules
=
array
(
'editor'
,
'editor_test'
);
/**
* The manager for editor plug-ins.
*
...
...
@@ -65,9 +70,6 @@ public function setUp() {
// Install the Filter module.
$this
->
installSchema
(
'system'
,
'url_alias'
);
// Enable the Text Editor and Text Editor Test module.
$this
->
enableModules
(
array
(
'editor'
,
'editor_test'
));
// Create a field.
$this
->
field_name
=
'field_textarea'
;
$this
->
createFieldWithInstance
(
...
...
core/modules/entity/src/Tests/EntityDisplayTest.php
View file @
f9c1ff23
...
...
@@ -16,7 +16,7 @@
*/
class
EntityDisplayTest
extends
DrupalUnitTestBase
{
public
static
$modules
=
array
(
'entity'
,
'field'
,
'entity_test'
,
'user'
,
'text'
,
'
entity_test
'
);
public
static
$modules
=
array
(
'entity'
,
'field'
,
'entity_test'
,
'user'
,
'text'
,
'
field_test'
,
'node'
,
'system
'
);
protected
function
setUp
()
{
parent
::
setUp
();
...
...
@@ -137,8 +137,6 @@ public function testExtraFieldComponent() {
* Tests the behavior of a field component within an entity display object.
*/
public
function
testFieldComponent
()
{
$this
->
enableModules
(
array
(
'field_test'
));
$field_name
=
'test_field'
;
// Create a field storage and an instance.
$field_storage
=
entity_create
(
'field_storage_config'
,
array
(
...
...
@@ -264,7 +262,6 @@ public function testBaseFieldComponent() {
* Tests renaming and deleting a bundle.
*/
public
function
testRenameDeleteBundle
()
{
$this
->
enableModules
(
array
(
'field_test'
,
'node'
,
'system'
,
'text'
));
$this
->
installEntitySchema
(
'node'
);
// Create a node bundle, display and form display object.
...
...
@@ -314,8 +311,6 @@ public function testRenameDeleteBundle() {
* Tests deleting field instance.
*/
public
function
testDeleteFieldInstance
()
{
$this
->
enableModules
(
array
(
'field_test'
));
$field_name
=
'test_field'
;
// Create a field storage and an instance.
$field_storage
=
entity_create
(
'field_storage_config'
,
array
(
...
...
core/modules/entity/src/Tests/EntityFormDisplayTest.php
View file @
f9c1ff23
...
...
@@ -16,7 +16,7 @@
*/
class
EntityFormDisplayTest
extends
DrupalUnitTestBase
{
public
static
$modules
=
array
(
'entity'
,
'field'
,
'entity_test'
,
'user'
,
'text'
);
public
static
$modules
=
array
(
'entity'
,
'field'
,
'entity_test'
,
'field_test'
,
'user'
,
'text'
);
protected
function
setUp
()
{
parent
::
setUp
();
...
...
@@ -47,8 +47,6 @@ public function testEntityGetFromDisplay() {
* Tests the behavior of a field component within an EntityFormDisplay object.
*/
public
function
testFieldComponent
()
{
$this
->
enableModules
(
array
(
'field_test'
));
// Create a field storage and an instance.
$field_name
=
'test_field'
;
$field_storage
=
entity_create
(
'field_storage_config'
,
array
(
...
...
@@ -177,8 +175,6 @@ public function testBaseFieldComponent() {
* Tests deleting field instance.
*/
public
function
testDeleteFieldInstance
()
{
$this
->
enableModules
(
array
(
'field_sql_storage'
,
'field_test'
));
$field_name
=
'test_field'
;
// Create a field storage and an instance.
$field_storage
=
entity_create
(
'field_storage_config'
,
array
(
...
...
core/modules/field/src/Tests/Email/EmailItemTest.php
View file @
f9c1ff23
...
...
@@ -18,13 +18,6 @@
*/
class
EmailItemTest
extends
FieldUnitTestBase
{
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
array
(
'email'
);
public
function
setUp
()
{
parent
::
setUp
();
...
...
core/modules/field/src/Tests/FieldImportDeleteUninstallTest.php
View file @
f9c1ff23
...
...
@@ -22,7 +22,7 @@ class FieldImportDeleteUninstallTest extends FieldUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'telephone'
,
'menu_link'
);
public
static
$modules
=
array
(
'telephone'
);
public
function
setUp
()
{
parent
::
setUp
();
...
...
core/modules/file/src/Tests/ValidatorTest.php
View file @
f9c1ff23
...
...
@@ -13,6 +13,17 @@
* @group file
*/
class
ValidatorTest
extends
FileManagedUnitTestBase
{
/**
* @var \Drupal\file\Entity\File
*/
protected
$image
;
/**
* @var \Drupal\file\Entity\File
*/
protected
$non_image
;
function
setUp
()
{
parent
::
setUp
();
...
...
core/modules/hal/src/Tests/NormalizerTestBase.php
View file @
f9c1ff23
...
...
@@ -33,7 +33,7 @@ abstract class NormalizerTestBase extends DrupalUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'entity'
,
'entity_test'
,
'entity_reference'
,
'field'
,
'hal'
,
'language'
,
'rest'
,
'serialization'
,
'system'
,
'text'
,
'user'
,
'filter'
,
'menu_link'
);
public
static
$modules
=
array
(
'entity'
,
'entity_test'
,
'entity_reference'
,
'field'
,
'hal'
,
'language'
,
'rest'
,
'serialization'
,
'system'
,
'text'
,
'user'
,
'filter'
);
/**
* The mock serializer.
...
...
core/modules/node/src/Tests/NodeLastChangedTest.php
View file @
f9c1ff23
...
...
@@ -21,7 +21,7 @@ class NodeLastChangedTest extends DrupalUnitTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'entity'
,
'user'
,
'node'
,
'field'
,
'text'
,
'filter'
);
public
static
$modules
=
array
(
'entity'
,
'user'
,
'node'
,
'field'
,
'system'
,
'text'
,
'filter'
);
public
function
setUp
()
{
parent
::
setUp
();
...
...
core/modules/quickedit/src/Tests/MetadataGeneratorTest.php
View file @
f9c1ff23
...
...
@@ -20,6 +20,11 @@
*/
class
MetadataGeneratorTest
extends
QuickEditTestBase
{
/**
* {@inheritdoc}
*/
public
static
$modules
=
array
(
'quickedit_test'
);
/**
* The manager for editor plugins.
*
...
...
@@ -124,8 +129,6 @@ public function testSimpleEntityType() {
public
function
testEditorWithCustomMetadata
()
{
$this
->
installSchema
(
'system'
,
'url_alias'
);
// Enable edit_test module so that the WYSIWYG editor becomes available.
$this
->
enableModules
(
array
(
'quickedit_test'
));
$this
->
editorManager
=
$this
->
container
->
get
(
'plugin.manager.quickedit.editor'
);
$this
->
editorSelector
=
new
EditorSelector
(
$this
->
editorManager
,
$this
->
container
->
get
(
'plugin.manager.field.formatter'
));
$this
->
metadataGenerator
=
new
MetadataGenerator
(
$this
->
accessChecker
,
$this
->
editorSelector
,
$this
->
editorManager
);
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
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