File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed
Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ parameters:
1111 count : 1
1212 path : src/DependencyInjection/ThumbnailService.php
1313 reportUnmatched : false
14+
15+ -
16+ message : ' #^Call to deprecated method#'
17+ count : 3
18+ path : src/DependencyInjection/ThumbnailService.php
19+ reportUnmatched : false
20+
1421 -
1522 message : " #^Call to an undefined method Shopware\\\\ Core\\\\ Content\\\\ Media\\\\ Message\\\\ GenerateThumbnailsMessage\\ :\\ :setContext\\ (\\ )\\ .$#"
1623 count : 1
Original file line number Diff line number Diff line change 88use Shopware \Core \Content \Media \Commands \GenerateThumbnailsCommand ;
99use Shopware \Core \Content \Media \Core \Application \AbstractMediaUrlGenerator ;
1010use Shopware \Core \Content \Media \MediaCollection ;
11+ use Shopware \Core \Content \Media \MediaEntity ;
1112use Shopware \Core \Content \Test \Media \MediaFixtures ;
1213use Shopware \Core \Framework \Context ;
1314use Shopware \Core \Framework \DataAbstractionLayer \EntityRepository ;
@@ -93,6 +94,7 @@ public function testMediaUrlWithInactiveConfigResultsInOriginalMedia(): void
9394 $ mediaResult = $ this ->mediaRepository ->search ($ searchCriteria , $ this ->context );
9495
9596 $ updatedMedia = $ mediaResult ->getEntities ()->first ();
97+ static ::assertInstanceOf (MediaEntity::class, $ updatedMedia );
9698
9799 $ thumbnails = $ updatedMedia ->getThumbnails ();
98100 static ::assertInstanceOf (MediaThumbnailCollection::class, $ thumbnails );
@@ -152,6 +154,7 @@ public function testMediaUrlWithActiveConfig(): void
152154 $ mediaResult = $ this ->mediaRepository ->search ($ searchCriteria , $ this ->context );
153155
154156 $ updatedMedia = $ mediaResult ->getEntities ()->first ();
157+ static ::assertInstanceOf (MediaEntity::class, $ updatedMedia );
155158
156159 $ thumbnails = $ updatedMedia ->getThumbnails ();
157160 static ::assertInstanceOf (MediaThumbnailCollection::class, $ thumbnails );
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public function testOnThumbnailSizeChanged(): void
4848 $ mediaFolderCollection = new MediaFolderCollection ();
4949 $ mediaFolderCollection ->add ($ mediaFolderEntity );
5050
51+ /** @var StaticEntityRepository<MediaFolderCollection> */
5152 $ mediaFolderRepository = new StaticEntityRepository ([$ mediaFolderCollection ]);
5253
5354 $ thumbnailSizesChangedListener = new ThumbnailSizesChangedListener (
Original file line number Diff line number Diff line change 33namespace Frosh \ThumbnailProcessor \Tests \Unit \Service ;
44
55use Frosh \ThumbnailProcessor \Service \SalesChannelIdDetector ;
6+ use PHPUnit \Framework \MockObject \MockObject ;
67use PHPUnit \Framework \TestCase ;
78use Shopware \Core \Content \ProductExport \ProductExportCollection ;
89use Shopware \Core \Content \ProductExport \ProductExportEntity ;
@@ -90,6 +91,7 @@ public function testGetSalesChannelIdProductExport(): void
9091 $ productExportCollection = new ProductExportCollection ();
9192 $ productExportCollection ->add ($ productExportEntity );
9293
94+ /** @var StaticEntityRepository<ProductExportCollection> */
9395 $ productExportRepository = new StaticEntityRepository ([$ productExportCollection ]);
9496
9597 $ class = new SalesChannelIdDetector ($ requestStack , $ productExportRepository );
@@ -106,6 +108,7 @@ public function testGetSalesChannelIdProductExportWithoutFileNameAndAccessKey():
106108 ],
107109 ));
108110
111+ /** @var StaticEntityRepository<ProductExportCollection>&MockObject */
109112 $ productExportRepository = $ this ->createMock (StaticEntityRepository::class);
110113 $ productExportRepository ->expects (static ::never ())->method ('search ' );
111114
You can’t perform that action at this time.
0 commit comments