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 <?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. * Test behaviors when visiting the action listing page.
* *
* @group action * @group action
*/ */
class ActionListTest extends WebTestBase { class ActionListTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
/** /**
* Defines a base class for testing the Aggregator module. * 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 { abstract class AggregatorTestBase extends WebTestBase {
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
/** /**
* Delete feed items from a feed. * Delete feed items from a feed.
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
/** /**
* Delete feed test. * Delete feed test.
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
use Drupal\aggregator\Entity\Feed; use Drupal\aggregator\Entity\Feed;
use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase; use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
/** /**
* Tests the fetcher plugins functionality and discoverability. * Tests the fetcher plugins functionality and discoverability.
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
use Drupal\Core\Url; use Drupal\Core\Url;
use Drupal\aggregator\Entity\Feed; use Drupal\aggregator\Entity\Feed;
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
use Drupal\aggregator\Entity\Feed; use Drupal\aggregator\Entity\Feed;
use Drupal\aggregator\Entity\Item; use Drupal\aggregator\Entity\Item;
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
/** /**
* Tests OPML import. * Tests OPML import.
......
<?php <?php
namespace Drupal\aggregator\Tests; namespace Drupal\Tests\aggregator\Functional;
use Drupal\aggregator\Entity\Feed; use Drupal\aggregator\Entity\Feed;
use Drupal\aggregator\Entity\Item; use Drupal\aggregator\Entity\Item;
......
<?php <?php
namespace Drupal\block\Tests; namespace Drupal\Tests\block\Functional;
use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\Cache;
use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase;
/** /**
* Tests block caching. * Tests block caching.
* *
* @group block * @group block
*/ */
class BlockCacheTest extends WebTestBase { class BlockCacheTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
<?php <?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 * Tests that a newly installed theme does not inherit blocks to its hidden
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* @group block * @group block
*/ */
class BlockHiddenRegionTest extends WebTestBase { class BlockHiddenRegionTest extends BrowserTestBase {
/** /**
* An administrative user to configure the test environment. * An administrative user to configure the test environment.
......
<?php <?php
namespace Drupal\block\Tests; namespace Drupal\Tests\block\Functional;
use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\Unicode;
use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase;
/** /**
* Tests for Block module regarding hook_entity_operations_alter(). * Tests for Block module regarding hook_entity_operations_alter().
* *
* @group block * @group block
*/ */
class BlockHookOperationTest extends WebTestBase { class BlockHookOperationTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
<?php <?php
namespace Drupal\block\Tests; namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase;
/** /**
* Tests block HTML ID validity. * Tests block HTML ID validity.
* *
* @group block * @group block
*/ */
class BlockHtmlTest extends WebTestBase { class BlockHtmlTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
<?php <?php
namespace Drupal\block\Tests; namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase;
use Drupal\block\Entity\Block; use Drupal\block\Entity\Block;
/** /**
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* @group block * @group block
*/ */
class BlockInvalidRegionTest extends WebTestBase { class BlockInvalidRegionTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
<?php <?php
namespace Drupal\block\Tests; namespace Drupal\Tests\block\Functional;
use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase;
use Drupal\block\Entity\Block; use Drupal\block\Entity\Block;
/** /**
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* @group block * @group block
*/ */
class BlockLanguageTest extends WebTestBase { class BlockLanguageTest extends BrowserTestBase {
/** /**
* An administrative user to configure the test environment. * An administrative user to configure the test environment.
......
<?php <?php
namespace Drupal\block\Tests; namespace Drupal\Tests\block\Functional;
use Drupal\block\Entity\Block; use Drupal\block\Entity\Block;
use Drupal\simpletest\WebTestBase; use Drupal\Tests\BrowserTestBase;
/** /**
* Tests the block_theme_suggestions_block() function. * Tests the block_theme_suggestions_block() function.
* *
* @group block * @group block
*/ */
class BlockTemplateSuggestionsTest extends WebTestBase { class BlockTemplateSuggestionsTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
<?php <?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. * Tests that the new default theme gets blocks.
* *
* @group block * @group block
*/ */
class NewDefaultThemeBlocksTest extends WebTestBase { class NewDefaultThemeBlocksTest extends BrowserTestBase {
/** /**
* Modules to install. * Modules to install.
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
/** /**
* Sets up block content types. * 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 { abstract class BlockContentTestBase extends WebTestBase {
......
<?php <?php
namespace Drupal\block_content\Tests; namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent; use Drupal\block_content\Entity\BlockContent;
use Drupal\block_content\Entity\BlockContentType; use Drupal\block_content\Entity\BlockContentType;
......
<?php <?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. * Create a block and test block access by attempting to view the block.
......
<?php <?php
namespace Drupal\block_content\Tests; namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent; use Drupal\block_content\Entity\BlockContent;
use Drupal\user\Entity\User; use Drupal\user\Entity\User;
......
<?php <?php
namespace Drupal\block_content\Tests; namespace Drupal\Tests\block_content\Functional;
use Drupal\block_content\Entity\BlockContent; 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