function TestingProfileHooksTest::testHookPickup

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Installer/TestingProfileHooksTest.php \Drupal\FunctionalTests\Installer\TestingProfileHooksTest::testHookPickup()

Test hooks are picked up.

Attributes

#[IgnoreDeprecations]

File

core/tests/Drupal/FunctionalTests/Installer/TestingProfileHooksTest.php, line 32

Class

TestingProfileHooksTest
Tests installing the Testing profile with update notifications on.

Namespace

Drupal\FunctionalTests\Installer

Code

public function testHookPickup() : void {
  $this->expectUserDeprecationMessage('Code in testing_hooks.profile is deprecated in drupal:11.5.0 and must be converted before drupal:13.0.0. Use classes instead. See https://www.drupal.org/node/3619765');
  $this->assertFalse(isset($GLOBALS['profile_procedural']));
  $this->assertFalse(isset($GLOBALS['profile_oop']));
  drupal_flush_all_caches();
  $this->assertTrue(isset($GLOBALS['profile_procedural']));
  $this->assertTrue(isset($GLOBALS['profile_oop']));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.