"Fix" test fail E2E_Extern_WidgetTest::testWidget by skipping it
authorRich Lott / Artful Robot <code.commits@artfulrobot.uk>
Sat, 2 Dec 2023 12:47:10 +0000 (12:47 +0000)
committerRich Lott / Artful Robot <code.commits@artfulrobot.uk>
Sat, 2 Dec 2023 12:47:10 +0000 (12:47 +0000)
Drupal8+ does not support the extern widgets, so we do the same for standalone.

As agreed with @totten

tests/phpunit/E2E/Extern/WidgetTest.php

index 4320e7942a709df9fb9d2887942af40c231ad7c0..2169d840724061552425eed93f84b1d543683154 100644 (file)
@@ -26,7 +26,8 @@ class E2E_Extern_WidgetTest extends CiviEndToEndTestCase {
    * Return widget Javascript.
    */
   public function testWidget(): void {
-    if (CIVICRM_UF !== 'Drupal8') {
+    if (!in_array(CIVICRM_UF, ['Drupal8', 'Standalone'])) {
+      // Skip the traditional tests for Drupal8+ and Standalone as these are unsupported.
       $endpoints['traditional'] = CRM_Core_Resources::singleton()->getUrl('civicrm', 'extern/widget.php');
     }
     $endpoints['normal'] = CRM_Utils_System::url('civicrm/contribute/widget', NULL, TRUE, NULL, FALSE, TRUE);