File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
tests/phpunit/ContentImport/Importers Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ public static function create( ?int $display ): MslsLink {
75
75
76
76
if ( has_filter ( 'msls_link_create ' ) ) {
77
77
/**
78
+ * @param MslsLink $obj
78
79
* @param int $display
79
80
*
80
81
* @return MslsLink
Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ parameters:
5
5
- MultisiteLanguageSwitcher.php
6
6
- includes
7
7
excludePaths :
8
- - tests
9
8
- vendor
10
- - includes/ContentImport
9
+ - tests
11
10
bootstrapFiles :
12
11
- tests/phpstan/bootstrap.php
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace lloc \MslsTests \ContentImport \Importers ;
4
+
5
+ use lloc \Msls \ContentImport \Importers \AttachmentsImporters ;
6
+ use lloc \MslsTests \MslsUnitTestCase ;
7
+
8
+ class TestAttachmentsImporters extends MslsUnitTestCase {
9
+
10
+
11
+ public function testDetails (): void {
12
+ $ obj = new AttachmentsImporters ();
13
+
14
+ $ expected = (object ) array (
15
+ 'slug ' => 'attachments ' ,
16
+ 'name ' => 'Image Attachments ' ,
17
+ 'importers ' => array (
18
+ 'linking ' => (object ) array (
19
+ 'name ' => 'Linking ' ,
20
+ 'description ' => 'Links the media attachments from the source post to the destination post; media attachments are not duplicated. ' ,
21
+ 'slug ' => 'linking ' ,
22
+ ),
23
+ ),
24
+ 'selected ' => 'linking ' ,
25
+ );
26
+
27
+ $ this ->assertEquals ( $ expected , $ obj ->details () );
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments