diff --git a/core/modules/system/src/Tests/Form/ExternalFormUrlTest.php b/core/modules/system/tests/src/Kernel/Form/ExternalFormUrlTest.php similarity index 97% rename from core/modules/system/src/Tests/Form/ExternalFormUrlTest.php rename to core/modules/system/tests/src/Kernel/Form/ExternalFormUrlTest.php index f179ec9..e756374 100644 --- a/core/modules/system/src/Tests/Form/ExternalFormUrlTest.php +++ b/core/modules/system/tests/src/Kernel/Form/ExternalFormUrlTest.php @@ -5,11 +5,11 @@ * Contains \Drupal\system\Tests\Form\ExternalFormUrlTest. */ -namespace Drupal\system\Tests\Form; +namespace Drupal\Tests\system\Kernel\Form; use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\FormStateInterface; -use Drupal\simpletest\KernelTestBase; +use Drupal\KernelTests\KernelTestBase; use Drupal\user\Entity\User; use Symfony\Component\HttpFoundation\Request; @@ -67,7 +67,6 @@ protected function setUp() { ]); $test_user->save(); \Drupal::service('current_user')->setAccount($test_user); - } /** diff --git a/core/modules/system/src/Tests/Form/FormCacheTest.php b/core/modules/system/tests/src/Kernel/Form/FormCacheTest.php similarity index 97% rename from core/modules/system/src/Tests/Form/FormCacheTest.php rename to core/modules/system/tests/src/Kernel/Form/FormCacheTest.php index 77d259e..bc8ed81 100644 --- a/core/modules/system/src/Tests/Form/FormCacheTest.php +++ b/core/modules/system/tests/src/Kernel/Form/FormCacheTest.php @@ -5,12 +5,12 @@ * Contains \Drupal\system\Tests\Form\FormCacheTest. */ -namespace Drupal\system\Tests\Form; +namespace Drupal\Tests\system\Kernel\Form; use Drupal\Core\Form\FormState; use Drupal\Core\Session\AnonymousUserSession; use Drupal\Core\Session\UserSession; -use Drupal\simpletest\KernelTestBase; +use Drupal\KernelTests\KernelTestBase; /** * Tests \Drupal::formBuilder()->setCache() and diff --git a/core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php b/core/modules/system/tests/src/Kernel/Form/FormDefaultHandlersTest.php similarity index 97% rename from core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php rename to core/modules/system/tests/src/Kernel/Form/FormDefaultHandlersTest.php index 94187af..a86bea4 100644 --- a/core/modules/system/src/Tests/Form/FormDefaultHandlersTest.php +++ b/core/modules/system/tests/src/Kernel/Form/FormDefaultHandlersTest.php @@ -5,12 +5,12 @@ * Contains \Drupal\system\Tests\Form\FormDefaultHandlersTest. */ -namespace Drupal\system\Tests\Form; +namespace Drupal\Tests\system\Kernel\Form; use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\FormState; use Drupal\Core\Form\FormStateInterface; -use Drupal\simpletest\KernelTestBase; +use Drupal\KernelTests\KernelTestBase; /** * Tests automatically added form handlers. diff --git a/core/modules/system/src/Tests/Image/ToolkitGdTest.php b/core/modules/system/tests/src/Kernel/Image/ToolkitGdTest.php similarity index 98% rename from core/modules/system/src/Tests/Image/ToolkitGdTest.php rename to core/modules/system/tests/src/Kernel/Image/ToolkitGdTest.php index 1c61235..f47d801 100644 --- a/core/modules/system/src/Tests/Image/ToolkitGdTest.php +++ b/core/modules/system/tests/src/Kernel/Image/ToolkitGdTest.php @@ -5,11 +5,12 @@ * Contains \Drupal\system\Tests\Image\ToolkitGdTest. */ -namespace Drupal\system\Tests\Image; +namespace Drupal\Tests\system\Kernel\Image; use Drupal\Core\Image\ImageInterface; use Drupal\Component\Utility\SafeMarkup; -use Drupal\simpletest\KernelTestBase; +use Drupal\Core\Site\Settings; +use Drupal\KernelTests\KernelTestBase; /** * Tests that core image manipulations work properly: scale, resize, rotate, @@ -253,7 +254,7 @@ function testManipulations() { } // Prepare a directory for test file results. - $directory = $this->publicFilesDirectory .'/imagetest'; + $directory = Settings::get('file_public_path') .'/imagetest'; file_prepare_directory($directory, FILE_CREATE_DIRECTORY); foreach ($files as $file) { @@ -429,7 +430,7 @@ public function testResourceDestruction() { */ function testGifTransparentImages() { // Prepare a directory for test file results. - $directory = $this->publicFilesDirectory .'/imagetest'; + $directory = Settings::get('file_public_path') .'/imagetest'; file_prepare_directory($directory, FILE_CREATE_DIRECTORY); // Test loading an indexed GIF image with transparent color set. diff --git a/core/modules/system/src/Tests/Form/TriggeringElementProgrammedUnitTest.php b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedUnitTest.php similarity index 95% rename from core/modules/system/src/Tests/Form/TriggeringElementProgrammedUnitTest.php rename to core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedUnitTest.php index ae6b82c..d63eb4c 100644 --- a/core/modules/system/src/Tests/Form/TriggeringElementProgrammedUnitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Form/TriggeringElementProgrammedUnitTest.php @@ -5,12 +5,12 @@ * Contains \Drupal\system\Tests\Form\TriggeringElementProgrammedUnitTest. */ -namespace Drupal\system\Tests\Form; +namespace Drupal\KernelTests\Core\Form; use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\FormState; use Drupal\Core\Form\FormStateInterface; -use Drupal\simpletest\KernelTestBase; +use Drupal\KernelTests\KernelTestBase; /** * Tests detection of triggering_element for programmed form submissions. @@ -19,8 +19,6 @@ */ class TriggeringElementProgrammedUnitTest extends KernelTestBase implements FormInterface { - public static $modules = array('system'); - /** * {@inheritdoc} */ diff --git a/core/modules/system/src/Tests/HttpKernel/StackKernelIntegrationTest.php b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php similarity index 94% rename from core/modules/system/src/Tests/HttpKernel/StackKernelIntegrationTest.php rename to core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php index d976b37..c4d7ec7 100644 --- a/core/modules/system/src/Tests/HttpKernel/StackKernelIntegrationTest.php +++ b/core/tests/Drupal/KernelTests/Core/HttpKernel/StackKernelIntegrationTest.php @@ -5,10 +5,10 @@ * Contains \Drupal\system\Tests\HttpKernel\StackKernelIntegrationTest. */ -namespace Drupal\system\Tests\HttpKernel; +namespace Drupal\KernelTests\Core\HttpKernel; -use Drupal\simpletest\KernelTestBase; use Drupal\Core\Url; +use Drupal\KernelTests\KernelTestBase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -57,7 +57,7 @@ public function testLazyLateMiddlewares() { $this->assertFalse($this->container->getDefinition('http_kernel.basic')->isLazy(), 'lazy flag on http_kernel.basic definition is not set'); \Drupal::service('module_installer')->install(['page_cache']); - $this->container = $this->kernel->rebuildContainer(); + $this->container = \Drupal::service('kernel')->rebuildContainer(); $this->assertFalse($this->container->getDefinition('http_middleware.reverse_proxy')->isLazy(), 'lazy flag on http_middleware.reverse_proxy definition is not set'); $this->assertFalse($this->container->getDefinition('http_middleware.page_cache')->isLazy(), 'lazy flag on http_middleware.page_cache definition is not set'); diff --git a/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php b/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php similarity index 96% rename from core/modules/system/src/Tests/Installer/InstallerLanguageTest.php rename to core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php index 417cfd0..3d798b0 100644 --- a/core/modules/system/src/Tests/Installer/InstallerLanguageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php @@ -5,10 +5,10 @@ * Contains \Drupal\system\Tests\Installer\InstallerLanguageTest. */ -namespace Drupal\system\Tests\Installer; +namespace Drupal\KernelTests\Core\Installer; -use Drupal\simpletest\KernelTestBase; use Drupal\Core\StringTranslation\Translator\FileTranslation; +use Drupal\KernelTests\KernelTestBase; /** * Tests for installer language support.