diff --git a/includes/MslsLink.php b/includes/MslsLink.php index 6e9246a3..671bbfc3 100644 --- a/includes/MslsLink.php +++ b/includes/MslsLink.php @@ -75,6 +75,7 @@ public static function create( ?int $display ): MslsLink { if ( has_filter( 'msls_link_create' ) ) { /** + * @param MslsLink $obj * @param int $display * * @return MslsLink diff --git a/phpstan.neon b/phpstan.neon index 0bd7c5d5..330e8792 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,8 +5,7 @@ parameters: - MultisiteLanguageSwitcher.php - includes excludePaths: - - tests - vendor - - includes/ContentImport + - tests bootstrapFiles: - tests/phpstan/bootstrap.php diff --git a/tests/phpunit/ContentImport/Importers/TestAttachmentsImporters.php b/tests/phpunit/ContentImport/Importers/TestAttachmentsImporters.php new file mode 100644 index 00000000..2e852482 --- /dev/null +++ b/tests/phpunit/ContentImport/Importers/TestAttachmentsImporters.php @@ -0,0 +1,29 @@ + 'attachments', + 'name' => 'Image Attachments', + 'importers' => array( + 'linking' => (object) array( + 'name' => 'Linking', + 'description' => 'Links the media attachments from the source post to the destination post; media attachments are not duplicated.', + 'slug' => 'linking', + ), + ), + 'selected' => 'linking', + ); + + $this->assertEquals( $expected, $obj->details() ); + } +}