Skip to content
Snippets Groups Projects
Commit 0fe04b15 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2798097 by klausi, claudiu.cristea: Move all kernel tests to their correct phpunit location

parent e3587e21
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -2,46 +2,12 @@
namespace Drupal\serialization\Tests;
use Drupal\KernelTests\KernelTestBase;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
abstract class NormalizerTestBase extends KernelTestBase {
use Drupal\Tests\serialization\Kernel\NormalizerTestBase as SerializationNormalizerTestBase;
/**
* Modules to enable.
* Helper base class to set up some test fields for serialization testing.
*
* @var array
* @deprecated Scheduled for removal in Drupal 9.0.0.
* Use \Drupal\Tests\serialization\Kernel\NormalizerTestBase instead.
*/
public static $modules = array('serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user');
protected function setUp() {
parent::setUp();
$this->installEntitySchema('entity_test_mulrev');
$this->installEntitySchema('user');
$this->installConfig(array('field'));
\Drupal::service('router.builder')->rebuild();
\Drupal::moduleHandler()->invoke('rest', 'install');
// Auto-create a field for testing.
FieldStorageConfig::create(array(
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'type' => 'text',
'cardinality' => 1,
'translatable' => FALSE,
))->save();
FieldConfig::create(array(
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'bundle' => 'entity_test_mulrev',
'label' => 'Test text-field',
'widget' => array(
'type' => 'text_textfield',
'weight' => 0,
),
))->save();
}
}
abstract class NormalizerTestBase extends SerializationNormalizerTestBase { }
<?php
namespace Drupal\serialization\Tests;
namespace Drupal\Tests\serialization\Kernel;
use Drupal\Core\Url;
use Drupal\entity_test\Entity\EntityTestMulRev;
......
<?php
namespace Drupal\serialization\Tests;
namespace Drupal\Tests\serialization\Kernel;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\entity_test\Entity\EntityTestMulRev;
......
<?php
namespace Drupal\Tests\serialization\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
/**
* Helper base class to set up some test fields for serialization testing.
*/
abstract class NormalizerTestBase extends KernelTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('serialization', 'system', 'field', 'entity_test', 'text', 'filter', 'user');
protected function setUp() {
parent::setUp();
$this->installEntitySchema('entity_test_mulrev');
$this->installEntitySchema('user');
$this->installConfig(array('field'));
\Drupal::service('router.builder')->rebuild();
\Drupal::moduleHandler()->invoke('rest', 'install');
// Auto-create a field for testing.
FieldStorageConfig::create(array(
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'type' => 'text',
'cardinality' => 1,
'translatable' => FALSE,
))->save();
FieldConfig::create(array(
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'bundle' => 'entity_test_mulrev',
'label' => 'Test text-field',
'widget' => array(
'type' => 'text_textfield',
'weight' => 0,
),
))->save();
}
}
<?php
namespace Drupal\system\Tests\Common;
namespace Drupal\Tests\system\Kernel\Common;
use Drupal\KernelTests\KernelTestBase;
......
<?php
namespace Drupal\system\Tests\Common;
namespace Drupal\Tests\system\Kernel\Common;
use Drupal\Core\Extension\ExtensionDiscovery;
use Drupal\KernelTests\KernelTestBase;
......
......@@ -6,6 +6,9 @@
/**
* Base test class for views plugin unit tests.
*
* @deprecated Scheduled for removal in Drupal 9.0.0.
* Use \Drupal\Tests\views\Kernel\ViewsKernelTestBase instead.
*/
abstract class PluginKernelTestBase extends ViewKernelTestBase {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment