Skip to content

Commit 5693f1f

Browse files
committed
MC-39929: Stabilize Unit tests (ASI)
Fixed static tests for unit tests
1 parent d77a4c4 commit 5693f1f

File tree

16 files changed

+23
-3
lines changed

16 files changed

+23
-3
lines changed

AdobeIms/Test/Unit/Controller/Adminhtml/OAuth/CallbackTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
/**
2828
* User repository test.
29+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2930
*/
3031
class CallbackTest extends TestCase
3132
{

AdobeIms/Test/Unit/Model/LogOutTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
/**
2424
* LogOut test.
25+
* Test for Logout
2526
*/
2627
class LogOutTest extends TestCase
2728
{
@@ -77,7 +78,8 @@ protected function setUp(): void
7778
{
7879
$this->curlFactoryMock = $this->createMock(CurlFactory::class);
7980
$this->userProfileInterfaceMock = $this->getMockForAbstractClass(UserProfileInterface::class);
80-
$this->userProfileRepositoryInterfaceMock = $this->getMockForAbstractClass(UserProfileRepositoryInterface::class);
81+
$this->userProfileRepositoryInterfaceMock = $this
82+
->getMockForAbstractClass(UserProfileRepositoryInterface::class);
8183
$this->userContextInterfaceMock = $this->getMockForAbstractClass(UserContextInterface::class);
8284
$this->configInterfaceMock = $this->getMockForAbstractClass(ConfigInterface::class);
8385
$this->loggerInterfaceMock = $this->getMockForAbstractClass(LoggerInterface::class);

AdobeStockAsset/Test/Api/AssetRepository/GetByIdTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
/**
2121
* Class GetByIdTest
22+
* Test for CollectionFactory
2223
*/
2324
class GetByIdTest extends WebapiAbstract
2425
{

AdobeStockAsset/Test/Unit/Model/CategoryRepositoryTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
/**
2828
* Category repository test.
29+
* Test for Category repository
30+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2931
*/
3032
class CategoryRepositoryTest extends TestCase
3133
{

AdobeStockAsset/Test/Unit/Model/CreatorRepositoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
/**
2828
* Category repository test.
29+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2930
*/
3031
class CreatorRepositoryTest extends TestCase
3132
{

AdobeStockClient/Test/Unit/Model/ClientTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
/**
3939
* Config data test.
40+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
4041
*/
4142
class ClientTest extends TestCase
4243
{

AdobeStockClient/Test/Unit/Model/ConnectionWrapperTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
/**
2727
* Connection wrapper test.
28+
* Test for ConnectionWrapper class
29+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2830
*/
2931
class ConnectionWrapperTest extends TestCase
3032
{
@@ -85,7 +87,7 @@ protected function setUp(): void
8587
$this->getAccessToken = $this->getMockForAbstractClass(GetAccessTokenInterface::class);
8688
$this->flushToken = $this->getMockForAbstractClass(FlushUserTokensInterface::class);
8789
$this->httpInterface = $this->getMockForAbstractClass(HttpInterface::class);
88-
$this->adobeStockMock = $adobeStockMock = $this->createMock(AdobeStock::class);
90+
$this->adobeStockMock = $this->createMock(AdobeStock::class);
8991
$this->connectionFactory->expects($this->once())->method('create')->willReturn($this->adobeStockMock);
9092
$this->configInterface->expects($this->once())->method('getProductName')->willReturn('name');
9193
$this->configInterface->expects($this->once())->method('getTargetEnvironment')->willReturn('target');

AdobeStockImage/Test/Unit/Model/Extract/DocumentToAssetTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
/**
2424
* Document to asset test.
25+
* Test for AdobeStockAsset
2526
*/
2627
class DocumentToAssetTest extends TestCase
2728
{

AdobeStockImage/Test/Unit/Model/GetRelatedImagesTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
/**
2525
* Test for GetRelatedImages Model
26+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2627
*/
2728
class GetRelatedImagesTest extends TestCase
2829
{
@@ -163,7 +164,7 @@ public function testExceptionThrownOnGetImageListExecute(): void
163164

164165
/**
165166
* Series Data provider.
166-
*
167+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
167168
* @return array
168169
*/
169170
public function relatedImagesDataProvider(): array

AdobeStockImage/Test/Unit/Model/SaveImageTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
/**
2828
* Test for Save image model.
29+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2930
*/
3031
class SaveImageTest extends TestCase
3132
{

0 commit comments

Comments
 (0)