Skip to content
Snippets Groups Projects
Verified Commit 4680f1ab authored by Dave Long's avatar Dave Long
Browse files

Issue #3325057 by mallezie, mstrelan, smustgrave, spokje, danielveza: Fix...

Issue #3325057 by mallezie, mstrelan, smustgrave, spokje, danielveza: Fix PHPStan L2 error in traits
parent 718a97e6
No related branches found
No related tags found
3 merge requests!5423Draft: Resolve #3329907 "Test2",!3478Issue #3337882: Deleted menus are not removed from content type config,!579Issue #2230909: Simple decimals fail to pass validation
Pipeline #474746 passed with warnings
Pipeline: drupal

#474762

    Pipeline: drupal

    #474758

      Pipeline: drupal

      #474748

        ......@@ -49,6 +49,8 @@ public function checkDependencyMessage(array $modules, $dependency, Dependency $
        ]);
        }
        }
        return NULL;
        }
        }
        ......@@ -17,6 +17,7 @@ public function getFormClass($operation) {
        elseif ($operation === 'configure' && $this instanceof PluginFormInterface) {
        return static::class;
        }
        return NULL;
        }
        /**
        ......
        ......@@ -4,6 +4,7 @@
        namespace Drupal\Tests\content_moderation\Traits;
        use Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface;
        use Drupal\workflows\Entity\Workflow;
        use Drupal\workflows\WorkflowInterface;
        ......@@ -103,8 +104,11 @@ protected function createEditorialWorkflow() {
        * The bundle ID to add.
        */
        protected function addEntityTypeAndBundleToWorkflow(WorkflowInterface $workflow, $entity_type_id, $bundle) {
        $workflow->getTypePlugin()->addEntityTypeAndBundle($entity_type_id, $bundle);
        $workflow->save();
        $moderation = $workflow->getTypePlugin();
        if ($moderation instanceof ContentModerationInterface) {
        $moderation->addEntityTypeAndBundle($entity_type_id, $bundle);
        $workflow->save();
        }
        }
        }
        ......@@ -54,7 +54,9 @@ protected function createMediaType($source_plugin_id, array $values = []) {
        // The media type form creates a source field if it does not exist yet. The
        // same must be done in a kernel test, since it does not use that form.
        // @see \Drupal\media\MediaTypeForm::save()
        $source_field->getFieldStorageDefinition()->save();
        /** @var \Drupal\field\FieldStorageConfigInterface $storage */
        $storage = $source_field->getFieldStorageDefinition();
        $storage->save();
        // The source field storage has been created, now the field can be saved.
        $source_field->save();
        ......
        ......@@ -25,7 +25,7 @@ trait BasicAuthResourceTestTrait {
        protected function getAuthenticationRequestOptions($method): array {
        return [
        'headers' => [
        'Authorization' => 'Basic ' . base64_encode($this->account->name->value . ':' . $this->account->passRaw),
        'Authorization' => 'Basic ' . base64_encode($this->account->getAccountName() . ':' . $this->account->passRaw),
        ],
        ];
        }
        ......
        ......@@ -202,7 +202,13 @@ protected function createScreenshot($filename, $set_background_color = TRUE) {
        }
        /**
        * {@inheritdoc}
        * Returns WebAssert object.
        *
        * @param string $name
        * (optional) Name of the session. Defaults to the active session.
        *
        * @return \Drupal\FunctionalJavascriptTests\WebDriverWebAssert
        * A new web-assert option for asserting the presence of elements with.
        */
        public function assertSession($name = NULL) {
        return new WebDriverWebAssert($this->getSession($name), $this->baseUrl);
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment