Skip to content
Snippets Groups Projects
Verified Commit c304b092 authored by Jess's avatar Jess
Browse files

Issue #3399992 by mstrelan, smustgrave, xjm: Fix strict type errors in test traits

parent 73b46284
Branches
Tags
40 merge requests!12227Issue #3181946 by jonmcl, mglaman,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8323Fix source code editing and in place front page site studio editing.,!6278Issue #3187770 by godotislate, smustgrave, catch, quietone: Views Rendered...,!54479.5.x SF update,!3878Removed unused condition head title for views,!38582585169-10.1.x,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3668Resolve #3347842 "Deprecate the trusted",!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3546refactored dialog.pcss file,!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3502Issue #3335308: Confusing behavior with FormState::setFormState and FormState::setMethod,!3478Issue #3337882: Deleted menus are not removed from content type config,!3452Issue #3332701: Refactor Claro's tablesort-indicator stylesheet,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3226Issue #2987537: Custom menu link entity type should not declare "bundle" entity key,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3147Issue #3328457: Replace most substr($a, $i) where $i is negative with str_ends_with(),!3146Issue #3328456: Replace substr($a, 0, $i) with str_starts_with(),!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2614Issue #2981326: Replace non-test usages of \Drupal::logger() with IoC injection,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2334Issue #3228209: Add hasRole() method to AccountInterface,!2062Issue #3246454: Add weekly granularity to views date sort,!1255Issue #3238922: Refactor (if feasible) uses of the jQuery serialize function to use vanillaJS,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!844Resolve #3036010 "Updaters",!673Issue #3214208: FinishResponseSubscriber could create duplicate headers,!617Issue #3043725: Provide a Entity Handler for user cancelation,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #50428 failed
Pipeline: drupal

#50437

    Pipeline: drupal

    #50436

      Pipeline: drupal

      #50435

        +1
        ......@@ -475,7 +475,7 @@ public function testLineBreakFilter() {
        $this->assertFilteredString($filter, $tests);
        // Very long string hitting PCRE limits.
        $limit = max(ini_get('pcre.backtrack_limit'), ini_get('pcre.recursion_limit'));
        $limit = max((int) ini_get('pcre.backtrack_limit'), (int) ini_get('pcre.recursion_limit'));
        $source = $this->randomMachineName($limit);
        $result = _filter_autop($source);
        $this->assertEquals($result, '<p>' . $source . "</p>\n", 'Line break filter can process very long strings.');
        ......
        ......@@ -2,7 +2,6 @@
        namespace Drupal\Tests\user\Traits;
        use Drupal\Component\Render\FormattableMarkup;
        use Drupal\Core\Database\DatabaseExceptionWrapper;
        use Drupal\Core\Entity\EntityStorageException;
        use Drupal\Core\Session\AccountInterface;
        ......@@ -183,7 +182,7 @@ protected function createUser(array $permissions = [], $name = NULL, $admin = FA
        $account->save();
        $valid_user = $account->id() !== NULL;
        $this->assertTrue($valid_user, new FormattableMarkup('User created with name %name and pass %pass', ['%name' => $edit['name'], '%pass' => $edit['pass']]));
        $this->assertTrue($valid_user, "User created with name {$edit['name']} and pass {$edit['pass']}");
        if (!$valid_user) {
        return FALSE;
        }
        ......@@ -263,7 +262,7 @@ protected function createRole(array $permissions, $rid = NULL, $name = NULL, $we
        }
        $result = $role->save();
        $this->assertSame(SAVED_NEW, $result, new FormattableMarkup('Created role ID @rid with name @name.', ['@name' => var_export($role->label(), TRUE), '@rid' => var_export($role->id(), TRUE)]));
        $this->assertSame(SAVED_NEW, $result, "Created role ID {$role->id()} with name {$role->label()}.");
        if ($result === SAVED_NEW) {
        // Grant the specified permissions to the role, if any.
        ......@@ -294,7 +293,7 @@ protected function checkPermissions(array $permissions) {
        $valid = TRUE;
        foreach ($permissions as $permission) {
        if (!in_array($permission, $available)) {
        $this->fail(new FormattableMarkup('Invalid permission %permission.', ['%permission' => $permission]));
        $this->fail("Invalid permission $permission.");
        $valid = FALSE;
        }
        }
        ......
        ......@@ -137,7 +137,7 @@ protected function htmlOutput($message = NULL) {
        */
        protected function initBrowserOutputFile() {
        $browser_output_file = getenv('BROWSERTEST_OUTPUT_FILE');
        $this->htmlOutputEnabled = is_file($browser_output_file);
        $this->htmlOutputEnabled = is_string($browser_output_file) && is_file($browser_output_file);
        $this->htmlOutputBaseUrl = getenv('BROWSERTEST_OUTPUT_BASE_URL') ?: $GLOBALS['base_url'];
        if ($this->htmlOutputEnabled) {
        $this->htmlOutputFile = $browser_output_file;
        ......
        ......@@ -3,7 +3,6 @@
        namespace Drupal\Tests;
        use Behat\Mink\Driver\BrowserKitDriver;
        use Drupal\Component\Render\FormattableMarkup;
        use Drupal\Component\Utility\Html;
        use Drupal\Component\Utility\UrlHelper;
        use Drupal\Core\Session\AccountInterface;
        ......@@ -161,7 +160,7 @@ protected function drupalLogin(AccountInterface $account) {
        // @see ::drupalUserIsLoggedIn()
        $account->sessionId = $this->getSession()->getCookie(\Drupal::service('session_configuration')->getOptions(\Drupal::request())['name']);
        $this->assertTrue($this->drupalUserIsLoggedIn($account), new FormattableMarkup('User %name successfully logged in.', ['%name' => $account->getAccountName()]));
        $this->assertTrue($this->drupalUserIsLoggedIn($account), "User {$account->getAccountName()} successfully logged in.");
        $this->loggedInUser = $account;
        $this->container->get('current_user')->setAccount($account);
        ......
        • Jess @xjm

          mentioned in commit b6052c19

          ·

          mentioned in commit b6052c19

          Toggle commit list
        • Jess @xjm

          mentioned in commit 67343dfe

          ·

          mentioned in commit 67343dfe

          Toggle commit list
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment