Commit 4c64f7b8 authored by catch's avatar catch

Issue #2770921 by dawehner, klausi, Mile23, mpdonadio, xjm, claudiu.cristea:...

Issue #2770921 by dawehner, klausi, Mile23, mpdonadio, xjm, claudiu.cristea: Feb 21st: Convert chunk of WTB to BTB by just moving classes, changing use statements adding traits
parent 0f844785
<?php
namespace Drupal\action\Tests;
namespace Drupal\Tests\action\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Test behaviors when visiting the action listing page.
*
* @group action
*/
class ActionListTest extends WebTestBase {
class ActionListTest extends BrowserTestBase {
/**
* Modules to install.
......
......@@ -9,6 +9,9 @@
/**
* Defines a base class for testing the Aggregator module.
*
* @deprecated Scheduled for removal in Drupal 9.0.0.
* Use \Drupal\Tests\aggregator\Functional\AggregatorTestBase instead.
*/
abstract class AggregatorTestBase extends WebTestBase {
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
/**
* Delete feed items from a feed.
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
/**
* Delete feed test.
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
use Drupal\aggregator\Entity\Feed;
use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
/**
* Tests the fetcher plugins functionality and discoverability.
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
use Drupal\Core\Url;
use Drupal\aggregator\Entity\Feed;
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
use Drupal\aggregator\Entity\Feed;
use Drupal\aggregator\Entity\Item;
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
/**
* Tests OPML import.
......
<?php
namespace Drupal\aggregator\Tests;
namespace Drupal\Tests\aggregator\Functional;
use Drupal\aggregator\Entity\Feed;
use Drupal\aggregator\Entity\Item;
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\Core\Cache\Cache;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests block caching.
*
* @group block
*/
class BlockCacheTest extends WebTestBase {
class BlockCacheTest extends BrowserTestBase {
/**
* Modules to install.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests that a newly installed theme does not inherit blocks to its hidden
......@@ -10,7 +10,7 @@
*
* @group block
*/
class BlockHiddenRegionTest extends WebTestBase {
class BlockHiddenRegionTest extends BrowserTestBase {
/**
* An administrative user to configure the test environment.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\Component\Utility\Unicode;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests for Block module regarding hook_entity_operations_alter().
*
* @group block
*/
class BlockHookOperationTest extends WebTestBase {
class BlockHookOperationTest extends BrowserTestBase {
/**
* Modules to install.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests block HTML ID validity.
*
* @group block
*/
class BlockHtmlTest extends WebTestBase {
class BlockHtmlTest extends BrowserTestBase {
/**
* Modules to install.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
use Drupal\block\Entity\Block;
/**
......@@ -11,7 +11,7 @@
*
* @group block
*/
class BlockInvalidRegionTest extends WebTestBase {
class BlockInvalidRegionTest extends BrowserTestBase {
/**
* Modules to install.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
use Drupal\block\Entity\Block;
/**
......@@ -11,7 +11,7 @@
*
* @group block
*/
class BlockLanguageTest extends WebTestBase {
class BlockLanguageTest extends BrowserTestBase {
/**
* An administrative user to configure the test environment.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\block\Entity\Block;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the block_theme_suggestions_block() function.
*
* @group block
*/
class BlockTemplateSuggestionsTest extends WebTestBase {
class BlockTemplateSuggestionsTest extends BrowserTestBase {
/**
* Modules to install.
......
<?php
namespace Drupal\block\Tests;
namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests that the new default theme gets blocks.
*
* @group block
*/
class NewDefaultThemeBlocksTest extends WebTestBase {
class NewDefaultThemeBlocksTest extends BrowserTestBase {
/**
* Modules to install.
......
......@@ -8,6 +8,9 @@
/**
* Sets up block content types.
*
* @deprecated Scheduled for removal in Drupal 9.0.0.
* Use \Drupal\Tests\block_content\Functional\BlockContentTestBase instead.
*/
abstract class BlockContentTestBase extends WebTestBase {
......
<?php
namespace Drupal\block_content\Tests;
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent;
use Drupal\block_content\Entity\BlockContentType;
......
<?php
namespace Drupal\block_content\Tests;
namespace Drupal\Tests\block_content\Functional;
/**
* Create a block and test block access by attempting to view the block.
......
<?php
namespace Drupal\block_content\Tests;
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent;
use Drupal\user\Entity\User;
......
<?php
namespace Drupal\block_content\Tests;
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent;
......
<?php
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent;
use Drupal\block_content\Entity\BlockContentType;
use Drupal\Tests\BrowserTestBase;
/**
* Sets up block content types.
*/
abstract class BlockContentTestBase extends BrowserTestBase {
/**
* Profile to use.
*/
protected $profile = 'testing';
/**
* Admin user
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* Permissions to grant admin user.
*
* @var array
*/
protected $permissions = array(
'administer blocks'
);
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('block', 'block_content');
/**
* Whether or not to auto-create the basic block type during setup.
*
* @var bool
*/
protected $autoCreateBasicBlockType = TRUE;
/**
* Sets the test up.
*/
protected function setUp() {
parent::setUp();
if ($this->autoCreateBasicBlockType) {
$this->createBlockContentType('basic', TRUE);
}
$this->adminUser = $this->drupalCreateUser($this->permissions);
$this->drupalPlaceBlock('local_actions_block');
}
/**
* Creates a custom block.
*
* @param bool|string $title
* (optional) Title of block. When no value is given uses a random name.
* Defaults to FALSE.
* @param string $bundle
* (optional) Bundle name. Defaults to 'basic'.
* @param bool $save
* (optional) Whether to save the block. Defaults to TRUE.
*
* @return \Drupal\block_content\Entity\BlockContent
* Created custom block.
*/
protected function createBlockContent($title = FALSE, $bundle = 'basic', $save = TRUE) {
$title = $title ?: $this->randomMachineName();
$block_content = BlockContent::create(array(
'info' => $title,
'type' => $bundle,
'langcode' => 'en'
));
if ($block_content && $save === TRUE) {
$block_content->save();
}
return $block_content;
}
/**
* Creates a custom block type (bundle).
*
* @param string $label
* The block type label.
* @param bool $create_body
* Whether or not to create the body field
*
* @return \Drupal\block_content\Entity\BlockContentType
* Created custom block type.
*/
protected function createBlockContentType($label, $create_body = FALSE) {
$bundle = BlockContentType::create(array(
'id' => $label,
'label' => $label,
'revision' => FALSE,
));
$bundle->save();
if ($create_body) {
block_content_add_body_field($bundle->id());
}
return $bundle;
}
}
<?php
namespace Drupal\block_content\Tests;
namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent;
use Drupal\Component\Utility\Unicode;
......
<?php
namespace Drupal\ckeditor\Tests;
namespace Drupal\Tests\ckeditor\Functional;
use Drupal\filter\Entity\FilterFormat;
use Drupal\editor\Entity\Editor;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
use Drupal\Component\Serialization\Json;
/**
......@@ -13,7 +13,7 @@
*
* @group ckeditor
*/
class CKEditorToolbarButtonTest extends WebTestBase {
class CKEditorToolbarButtonTest extends BrowserTestBase {
/**
* Modules to enable for this test.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\Core\Config\Entity\ConfigEntityStorage;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests configuration entities.
*
* @group config
*/
class ConfigDependencyWebTest extends WebTestBase {
class ConfigDependencyWebTest extends BrowserTestBase {
/**
* The maximum length for the entity storage used in this test.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
use Drupal\language\Entity\ConfigurableLanguage;
/**
......@@ -10,7 +10,7 @@
*
* @group config
*/
class ConfigEntityListMultilingualTest extends WebTestBase {
class ConfigEntityListMultilingualTest extends BrowserTestBase {
/**
* Modules to enable.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests configuration entity status UI functionality.
*
* @group config
*/
class ConfigEntityStatusUITest extends WebTestBase {
class ConfigEntityStatusUITest extends BrowserTestBase {
/**
* Modules to enable.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Config\InstallStorage;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
use Drupal\Core\Config\FileStorage;
use Drupal\system\Entity\Action;
use Drupal\tour\Entity\Tour;
......@@ -15,7 +15,7 @@
*
* @group config
*/
class ConfigInstallProfileOverrideTest extends WebTestBase {
class ConfigInstallProfileOverrideTest extends BrowserTestBase {
/**
* The profile to install as a basis for testing.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\Core\Language\LanguageInterface;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests language overrides applied through the website.
*
* @group config
*/
class ConfigLanguageOverrideWebTest extends WebTestBase {
class ConfigLanguageOverrideWebTest extends BrowserTestBase {
/**
* Modules to install.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests default configuration provided by a module that does not own it.
*
* @group config
*/
class ConfigOtherModuleTest extends WebTestBase {
class ConfigOtherModuleTest extends BrowserTestBase {
/**
* Tests enabling the provider of the default configuration first.
......
<?php
namespace Drupal\config\Tests;
namespace Drupal\Tests\config\Functional;
use Drupal\Core\Config\Schema\SchemaIncompleteException;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the functionality of ConfigSchemaChecker in WebTestBase tests.
*
* @group config
*/