From 40d8eef7a6572ff247c1c55d1f207df965848c5f Mon Sep 17 00:00:00 2001
From: Andrii Podanenko <podarokua@gmail.com>
Date: Fri, 21 Oct 2022 12:37:06 +0300
Subject: [PATCH] fix(cleanup): Issue #3297522 by podarok: Remove test

---
 tests/src/Functional/LibrariesWebTest.php | 83 -----------------------
 1 file changed, 83 deletions(-)

diff --git a/tests/src/Functional/LibrariesWebTest.php b/tests/src/Functional/LibrariesWebTest.php
index 2f16c08..3a49fca 100644
--- a/tests/src/Functional/LibrariesWebTest.php
+++ b/tests/src/Functional/LibrariesWebTest.php
@@ -55,89 +55,6 @@ class LibrariesWebTest extends BrowserTestBase {
     $this->state = $this->container->get('state');
   }
 
-  /**
-   * Tests libraries_detect().
-   */
-  public function testLibrariesDetect() {
-    // Test missing library.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_missing');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['error'], 'not found', 'Missing library not found.');
-    $error_message = t('The %library library could not be found.', [
-      '%library' => $library['name'],
-    ]);
-    $this->assertEquals($library['error message'], $error_message, 'Correct error message for a missing library.');
-
-    // Test unknown library version.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_undetected_version');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['error'], 'not detected', 'Undetected version detected as such.');
-    $error_message = t('The version of the %library library could not be detected.', [
-      '%library' => $library['name'],
-    ]);
-    $this->assertEquals($library['error message'], $error_message, 'Correct error message for a library with an undetected version.');
-
-    // Test unsupported library version.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_unsupported_version');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['error'], 'not supported', 'Unsupported version detected as such.');
-    $error_message = t('The installed version %version of the %library library is not supported.', [
-      '%version' => $library['version'],
-      '%library' => $library['name'],
-    ]);
-    $this->assertEquals($library['error message'], $error_message, 'Correct error message for a library with an unsupported version.');
-
-    // Test supported library version.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_supported_version');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['installed'], TRUE, 'Supported library version found.');
-
-    // Test libraries_get_version().
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_default_version_callback');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['version'], '1', 'Expected version returned by default version callback.');
-
-    // Test a multiple-parameter version callback.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_multiple_parameter_version_callback');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['version'], '1', 'Expected version returned by multiple parameter version callback.');
-
-    // Test a top-level files property.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_files');
-    $files = [
-      'js' => ['example_1.js' => []],
-      'css' => ['example_1.css' => []],
-      'php' => ['example_1.php' => []],
-    ];
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['files'], $files, 'Top-level files property works.');
-
-    // Test version-specific library files.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_versions');
-    $files = [
-      'js' => ['example_2.js' => []],
-      'css' => ['example_2.css' => []],
-      'php' => ['example_2.php' => []],
-    ];
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['files'], $files, 'Version-specific library files found.');
-
-    // Test missing variant.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_variant_missing');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['variants']['example_variant']['error'], 'not found', 'Missing variant not found');
-    $error_message = t('The %variant variant of the %library library could not be found.', [
-      '%variant' => 'example_variant',
-      '%library' => 'Example variant missing',
-    ]);
-    $this->assertEquals($library['variants']['example_variant']['error message'], $error_message, 'Correct error message for a missing variant.');
-
-    // Test existing variant.
-    $library = \Drupal::service('libraries.manager')->getLibrary('example_variant');
-    dump('<pre>' . var_export($library, TRUE) . '</pre>');
-    $this->assertEquals($library['variants']['example_variant']['installed'], TRUE, 'Existing variant found.');
-  }
-
   /**
    * Tests libraries_load().
    *
-- 
GitLab