You are here

public function UpdaterTest::testGetProjectTitleWithChild in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php \Drupal\KernelTests\Core\Updater\UpdaterTest::testGetProjectTitleWithChild()
  2. 9 core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php \Drupal\KernelTests\Core\Updater\UpdaterTest::testGetProjectTitleWithChild()

Tests project and child project showing correct title.

See also

https://drupal.org/node/2409515

File

core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php, line 24

Class

UpdaterTest
Tests InfoParser class and exception.

Namespace

Drupal\KernelTests\Core\Updater

Code

public function testGetProjectTitleWithChild() {

  // Get the project title from its directory. If it can't find the title
  // it will choose the first project title in the directory.
  $directory = $this->root . '/core/modules/system/tests/modules/module_handler_test_multiple';
  $title = Updater::getProjectTitle($directory);
  $this
    ->assertEquals('module handler test multiple', $title);
}