Commit 0463b81a authored by alexpott's avatar alexpott

Issue #2322889 by sun: Fixed Various setUp() and tearDown() methods are not protected.

parent f1713d57
......@@ -16,7 +16,7 @@
*/
class ActionLocalTasksTest extends LocalTaskIntegrationTest {
public function setUp() {
protected function setUp() {
$this->directoryList = array('action' => 'core/modules/action');
parent::setUp();
}
......
......@@ -23,7 +23,7 @@ abstract class AggregatorTestBase extends WebTestBase {
*/
public static $modules = array('node', 'aggregator', 'aggregator_test', 'views');
function setUp() {
protected function setUp() {
parent::setUp();
// Create an Article node type.
......
......@@ -30,7 +30,7 @@ public static function getInfo() {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
// Give anonymous users permission to access feeds, so that we can verify
......
......@@ -15,7 +15,7 @@
*/
class FeedFetcherPluginTest extends AggregatorTestBase {
public function setUp() {
protected function setUp() {
parent::setUp();
// Enable test plugins.
$this->enableTestPlugins();
......
......@@ -30,7 +30,7 @@ class FeedLanguageTest extends AggregatorTestBase {
*/
protected $langcodes = array();
public function setUp() {
protected function setUp() {
parent::setUp();
// Create test languages.
......
......@@ -15,7 +15,7 @@
* @group aggregator
*/
class FeedParserTest extends AggregatorTestBase {
function setUp() {
protected function setUp() {
parent::setUp();
// Do not delete old aggregator items during these tests, since our sample
// feeds have hardcoded dates in them (which may be expired when this test
......
......@@ -18,7 +18,7 @@ class FeedProcessorPluginTest extends AggregatorTestBase {
/**
* Overrides \Drupal\simpletest\WebTestBase::setUp().
*/
public function setUp() {
protected function setUp() {
parent::setUp();
// Enable test plugins.
$this->enableTestPlugins();
......
......@@ -21,7 +21,7 @@ class ImportOpmlTest extends AggregatorTestBase {
*/
public static $modules = array('block');
function setUp() {
protected function setUp() {
parent::setUp();
$admin_user = $this->drupalCreateUser(array('administer news feeds', 'access news feeds', 'create article content', 'administer blocks'));
......
......@@ -31,7 +31,7 @@ public static function getInfo() {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
// Give anonymous users permission to access feeds, so that we can verify
......
......@@ -16,7 +16,7 @@
*/
class AggregatorLocalTasksTest extends LocalTaskIntegrationTest {
public function setUp() {
protected function setUp() {
$this->directoryList = array('aggregator' => 'core/modules/aggregator');
parent::setUp();
}
......
......@@ -39,7 +39,7 @@ class AggregatorPluginSettingsBaseTest extends UnitTestCase {
*/
protected $managers;
public function setUp() {
protected function setUp() {
$this->configFactory = $this->getConfigFactoryStub(
array(
'aggregator.settings' => array(
......
......@@ -35,7 +35,7 @@ class BlockCacheTest extends WebTestBase {
*/
protected $block;
function setUp() {
protected function setUp() {
parent::setUp();
// Create an admin user, log in and enable test blocks.
......
......@@ -29,7 +29,7 @@ class BlockHiddenRegionTest extends WebTestBase {
*/
public static $modules = array('block', 'block_test', 'search');
function setUp() {
protected function setUp() {
parent::setUp();
// Create administrative user.
......
......@@ -24,7 +24,7 @@ class BlockHookOperationTest extends WebTestBase {
*/
public static $modules = array('block', 'entity_test');
public function setUp() {
protected function setUp() {
parent::setUp();
$permissions = array(
......
......@@ -23,7 +23,7 @@ class BlockHtmlTest extends WebTestBase {
*/
public static $modules = array('block', 'block_test');
function setUp() {
protected function setUp() {
parent::setUp();
$this->drupalLogin($this->root_user);
......
......@@ -24,7 +24,7 @@ class BlockInvalidRegionTest extends WebTestBase {
*/
public static $modules = array('block', 'block_test');
function setUp() {
protected function setUp() {
parent::setUp();
// Create an admin user.
$admin_user = $this->drupalCreateUser(array(
......
......@@ -32,7 +32,7 @@ class BlockLanguageCacheTest extends WebTestBase {
*/
protected $langcodes = array();
public function setUp() {
protected function setUp() {
parent::setUp();
// Create test languages.
......
......@@ -29,7 +29,7 @@ class BlockLanguageTest extends WebTestBase {
*/
public static $modules = array('language', 'block');
function setUp() {
protected function setUp() {
parent::setUp();
// Create a new user, allow him to manage the blocks and the languages.
......
......@@ -23,7 +23,7 @@ class BlockRenderOrderTest extends WebTestBase {
*/
public static $modules = array('node', 'block');
function setUp() {
protected function setUp() {
parent::setUp();
// Create a test user.
$end_user = $this->drupalCreateUser(array(
......
......@@ -24,7 +24,7 @@ class BlockSystemBrandingTest extends BlockTestBase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
// Set a site slogan.
\Drupal::config('system.site')
......
......@@ -35,7 +35,7 @@ abstract class BlockTestBase extends WebTestBase {
*/
protected $adminUser;
function setUp() {
protected function setUp() {
parent::setUp();
// Use the test page as the front page.
......
......@@ -44,7 +44,7 @@ class BlockUiTest extends WebTestBase {
*/
protected $adminUser;
function setUp() {
protected function setUp() {
parent::setUp();
// Create and log in an administrative user.
$this->adminUser = $this->drupalCreateUser(array(
......
......@@ -44,7 +44,7 @@ class BlockViewBuilderTest extends DrupalUnitTestBase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
parent::setUp();
$this->controller = $this->container
......
......@@ -48,7 +48,7 @@ class BlockConfigEntityUnitTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$this->entityTypeId = $this->randomMachineName();
$this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
......
......@@ -25,7 +25,7 @@ class CategoryAutocompleteTest extends UnitTestCase {
*/
protected $autocompleteController;
public function setUp() {
protected function setUp() {
$block_manager = $this->getMock('Drupal\block\BlockManagerInterface');
$block_manager->expects($this->any())
->method('getCategories')
......
......@@ -17,7 +17,7 @@
*/
class BlockLocalTasksTest extends LocalTaskIntegrationTest {
public function setUp() {
protected function setUp() {
$this->directoryList = array('block' => 'core/modules/block');
parent::setUp();
......
......@@ -33,7 +33,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITest {
/**
* Overrides \Drupal\simpletest\WebTestBase::setUp().
*/
public function setUp() {
protected function setUp() {
$this->entityTypeId = 'block_content';
$this->bundle = 'basic';
$this->testLanguageSelector = FALSE;
......
......@@ -17,7 +17,7 @@
*/
class BlockContentLocalTasksTest extends LocalTaskIntegrationTest {
public function setUp() {
protected function setUp() {
$this->directoryList = array(
'block' => 'core/modules/block',
'block_content' => 'core/modules/block_content',
......
......@@ -52,7 +52,7 @@ class BookTest extends WebTestBase {
*/
protected $admin_user;
function setUp() {
protected function setUp() {
parent::setUp();
// node_access_test requires a node_access_rebuild().
......
......@@ -16,7 +16,7 @@
*/
class BookLocalTasksTest extends LocalTaskIntegrationTest {
public function setUp() {
protected function setUp() {
$this->directoryList = array(
'book' => 'core/modules/book',
'node' => 'core/modules/node',
......
......@@ -21,7 +21,7 @@ abstract class BreakpointGroupTestBase extends WebTestBase {
*/
public static $modules = array('breakpoint');
public function setUp() {
protected function setUp() {
parent::setUp();
}
......
......@@ -21,7 +21,7 @@ abstract class BreakpointTestBase extends WebTestBase {
*/
public static $modules = array('breakpoint');
public function setUp() {
protected function setUp() {
parent::setUp();
}
......
......@@ -17,7 +17,7 @@
*/
class BreakpointThemeTest extends BreakpointGroupTestBase {
public function setUp() {
protected function setUp() {
parent::setUp();
theme_enable(array('breakpoint_test_theme'));
}
......
......@@ -55,7 +55,7 @@ class BreakpointConfigEntityUnitTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$this->entityTypeId = $this->randomMachineName();
$this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
......
......@@ -56,7 +56,7 @@ class BreakpointGroupConfigEntityUnitTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
public function setUp() {
protected function setUp() {
$this->entityTypeId = $this->randomMachineName();
$this->entityType = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
......
......@@ -25,7 +25,7 @@ class CKEditorAdminTest extends WebTestBase {
*/
public static $modules = array('filter', 'editor', 'ckeditor');
function setUp() {
protected function setUp() {
parent::setUp();
// Create text format.
......
......@@ -23,7 +23,7 @@ class CKEditorLoadingTest extends WebTestBase {
*/
public static $modules = array('filter', 'editor', 'ckeditor', 'node');
function setUp() {
protected function setUp() {
parent::setUp();
// Create text format, associate CKEditor.
......
......@@ -31,7 +31,7 @@ class CKEditorPluginManagerTest extends DrupalUnitTestBase {
*/
protected $manager;
function setUp() {
protected function setUp() {
parent::setUp();
// Install the Filter module.
......
......@@ -39,7 +39,7 @@ class CKEditorTest extends DrupalUnitTestBase {
*/
protected $manager;
function setUp() {
protected function setUp() {
parent::setUp();
// Install the Filter module.
......
......@@ -36,7 +36,7 @@ class ColorConfigSchemaTest extends WebTestBase {
/**
* {@inheritdoc}
*/
function setUp() {
protected function setUp() {
parent::setUp();
\Drupal::service('theme_handler')->enable(array('bartik'));
......
......@@ -51,7 +51,7 @@ class ColorTest extends WebTestBase {
/**
* {@inheritdoc}
*/
function setUp() {
protected function setUp() {
parent::setUp();
// Create user.
......
......@@ -14,7 +14,7 @@
*/
class CommentAnonymousTest extends CommentTestBase {
function setUp() {
protected function setUp() {
parent::setUp();
// Enable anonymous and authenticated user comments.
......
......@@ -22,7 +22,7 @@ class CommentBlockTest extends CommentTestBase {
*/
public static $modules = array('block', 'views');
function setUp() {
protected function setUp() {
parent::setUp();
// Update admin user to have the 'administer blocks' permission.
$this->admin_user = $this->drupalCreateUser(array(
......
......@@ -24,7 +24,7 @@ class CommentBookTest extends WebTestBase {
*/
public static $modules = array('book', 'comment');
function setUp() {