Loading core/modules/system/tests/src/Functional/Common/AlterTest.php→core/modules/system/tests/src/Kernel/Common/AlterTest.php +9 −13 Original line number Diff line number Diff line <?php namespace Drupal\Tests\system\Functional\Common; namespace Drupal\Tests\system\Kernel\Common; use Drupal\Tests\BrowserTestBase; use Drupal\KernelTests\KernelTestBase; /** * Tests alteration of arguments passed to \Drupal::moduleHandler->alter(). * * @group Common */ class AlterTest extends BrowserTestBase { /** * Modules to enable. * * @var array */ protected static $modules = ['block', 'common_test']; class AlterTest extends KernelTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; protected static $modules = [ 'block', 'common_test', 'system', ]; /** * Tests if the theme has been altered. */ public function testDrupalAlter() { public function testDrupalAlter(): void { // This test depends on Olivero, so make sure that it is always the current // active theme. \Drupal::service('theme_installer')->install(['olivero']); Loading @@ -52,7 +49,6 @@ public function testDrupalAlter() { // Verify alteration of multiple arguments. $array_copy = $array; $array_expected = ['foo' => 'Drupal theme']; $entity_copy = clone $entity; $entity_expected = clone $entity; $entity_expected->foo = 'Drupal theme'; Loading Loading
core/modules/system/tests/src/Functional/Common/AlterTest.php→core/modules/system/tests/src/Kernel/Common/AlterTest.php +9 −13 Original line number Diff line number Diff line <?php namespace Drupal\Tests\system\Functional\Common; namespace Drupal\Tests\system\Kernel\Common; use Drupal\Tests\BrowserTestBase; use Drupal\KernelTests\KernelTestBase; /** * Tests alteration of arguments passed to \Drupal::moduleHandler->alter(). * * @group Common */ class AlterTest extends BrowserTestBase { /** * Modules to enable. * * @var array */ protected static $modules = ['block', 'common_test']; class AlterTest extends KernelTestBase { /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; protected static $modules = [ 'block', 'common_test', 'system', ]; /** * Tests if the theme has been altered. */ public function testDrupalAlter() { public function testDrupalAlter(): void { // This test depends on Olivero, so make sure that it is always the current // active theme. \Drupal::service('theme_installer')->install(['olivero']); Loading @@ -52,7 +49,6 @@ public function testDrupalAlter() { // Verify alteration of multiple arguments. $array_copy = $array; $array_expected = ['foo' => 'Drupal theme']; $entity_copy = clone $entity; $entity_expected = clone $entity; $entity_expected->foo = 'Drupal theme'; Loading